rtc Dynamically Hide/Show fields


how can I rtc Dynamically Hide/Show fields in RTC.


IF ShowAllFields then begin

Field1Visible := True;

Field2Visible := True;

end else begin

Field1Visible := false;

Field2Visible := false;



Field1Visible are Booleans with the Property IncludeInDataset = Yes

Is this possible in RTC?


How to set the visible property of a control in the page?

At first I thought It should be the same with the method in the classic. But when I continue, I found it wasn’t. We can not use this method: Currpage.“Page Control”.Visible := True. You will got the error:" You have specified an unkown variable. Visible". At last, I check the help documents and with a long long router, I got it. I want to share it with my friends. That’s all. Please check the solution underneath.

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…

It is one of my journal…

Hoping this will be usefull.



It seems that we can not use this method after the initialize of the page cotrol is finished. We must use it before the initialize of the control. In my artical I assign the value for the globe variable before I call the ListPage.Runmodal.

Hey thanks for ur Reply, but it wasent the excat solution i was looking for.

I solved it with an extra Group. Its possible to show / hide a complete group at runtime.

I checked you solution and it works in a Card Page.

Does anybody know if this solutions can be applied in a list (and control it from the Card)?

I have the same problem. The solution is not works for List pages.

But the other solution could a convenience method, to integrate every field, what depends from a visible condition into a group. The group could use this IsVisible condition correctly, but the individual field is not. Strange. [8-)]