HIDE not Hiding control

I want to hide a checkbox if a string control has data in it. I test like this:

IF LEN(FullName0900AM) > 0 THEN DISABLE(Check0900AM).

Both data elements are local. I am looking at the value of FullName0900AM just before the above line like this:

message('FullName0900AM = ' & FullName0900AM & '|' & 'LEN FullName0900AM = ' & LEN(FullName0900AM))

It returns a length of 30. However, checkbox Check0900AM does not disable. I can still check/uncheck it.

I have tried the code in both Before and After Opening the Window EMBEDS.

Any ideas?

Using C8 Legacy templates.

thanks all

Mark

1 Like

You miss ? Before control

DISABLE(?Check0900AM)

UGHHH! That was it … I was looking at this for way too long. Just needed that little question mark.
Thanks for the catch!

Mark

1 Like

Hi Mark,

as well as the ? that Guennadi mentioned, I am wondering about you having:

that might work if FullName0900AM is a CString but you would be better to simply have:

if FullName0900AM

that way it will work for a String as well. Otherwise if FullName0900AM is a string, doing len() will just return the declared length. In that case you could say

if len(clip(FullName0900AM)) 

but better to simply say

if FullName0900AM

although some prefer

if FullName0900AM <> ''

hth

Geoff R

2 Likes