How to set the visible property of a control in the listpage

Hi All.

I have a list page opened from the card page. Is there any way to do this? when open the list page from the card page, how to set the visible property of the field control in the list page ? I tried this code.

function setDocTypeVisible (Var IsVisible :Boolean)
CurrPage.“Document Type”.Visible := IsVisible; //Here I got the message : You have specified an unkown variable. Visible.

And in the card page I intent to write.


I know this method works fine in the form. But In the rtc, It seems not work. If I omited something? Any suggestion will be warmly appreciated.

Thanks in advance.


Hi All.

I resolved. If we use the directly method as in the form (CurrForm.“Document Type”.Visible" := true) ,it doesn’t work in the rtc. We need use a long router way.

My steps:

  1. Define a globe variable “IsVisible” and set its “IncludeInDataSet” property be “yes”.
  2. Set the property visible of the control in the page be “IsVisible”
  3. create a function SetVisible (var visible : Boolean) to set the value of the variable “IsVisible”
    4.Before calling ListPage.RunModal = Action::LookupOk, I call that function first. Such as:
    ListPage.SetVisible(Visible);//Visible is a local variable in the call page.
    If ListPage.Runmodal = Action::LookupOk THEN BEGIN bla.bla.bla…

Any way thanks you all, I love this platform. GARY.