@Return not functioning?

Hi All,

I have the following function which seems to fail on me even though I am using @Return if ParentRef is not available?

OMCode := OMCode;

temp:= @If(!@IsAvailable(“ParentRef”);@Return(“”);@GetDocField(ParentRef;“OMCode”));

@If(temp=OMCode;“”;temp)

It appears as though @GetDocField is still being evaluated. Any ideas would be much appreciated.

Regards,

Terry

Subject: @Return not functioning?

If the field ParentRef resides on the form then @IsAvailable will always return true, have u tried this?

OMCode := OMCode;

@If(ParentRef =“”; @Return;(“”);@GetDocField(ParentRef;“OMCode”));

@If(temp=OMCode;“”;temp)

HTH

Steve

Subject: @Return not functioning?

I don’t know if this would cause an issue, but I don’t have quotes around the field name for @IsAvailable functions I have done.