>I want to use "WITH THIS.EventType" but how do I handle the CASE .EventType? >Something like .Value? Or can I not have an object.object this way?
>
> WITH THIS
> DO CASE
> CASE .EventType = 'A'
> .EventType.Code = 'S12'
The WITH - ENDWITH command/clause set is for referencing objects. In your example above, .EventType is both a property and an object, which cannot happen as you have above. You can have a custom property called EventType that can be assigned to both, but it cannot have it at the same time:
this.EventType = 'A'
...
WITH this
IF VARTYPE(.EventType) = "C"
DO CASE
CASE .EventType = 'A'
.EventType = oMyObjectRef
.EventType.Code = 'S12'
CASE .EventType = 'B'
ENDCASE
ELSE
ENDIF
ENDWITH