Visibility for Request page fields

Hi everyone,

I have a Request page with two fields: One Boolean(XX1) and one Date field(XX2)(both have global variables as sources).
I want the date field to be visible only if I check the boolean field.
I created a global variable isChecked, set the property IncludeInDataset to Yes and wrote the following code in the trigger OnValidate of XX1:


Unfortunately, it is not working.
How shall I do?

Thanks in advance :mrgreen:

Did you set isChecked in visibility property of Date field?



In your code, did you actually write


when maybe you wanted

isChecked := XX1;


Yes, It was isChecked := XX1;

but it’s not working.

If you’re hoping to have the date control update after you just check the boolean control (without tabbing off of that control to the date control), you might try a currpage.update command following your assignment statement.

I tried the CurrPage.UPDATE statement but I got an error message:

You have specified an unknown variable.


Define the variable under ‘Global C/AL symbols’.

By the way, I tried the same thing with property Editable of the field and it worked (the date field became editable when I checked the boolean field), but for property Visible, it is not working [:(]