Show factbox fields depending on values in field

MGoosenMGoosen Member Posts: 16
Hello everyone,

I'm trying to make the fields in a factbox visible/not visible depending on the values in the source table.
For example; if the source code is "extern", the field should be visible in the factbox and otherwise the field shouldn't be.

I created boolean global variables and set those in the Visible properties of the fields and I set those global variables to FALSE in the OnInsert trigger of the factbox. Next I put code in the OnAfterGetRecord trigger of the factbox to set the variables to TRUE depending on the condition (with a CASE statement).
Right now all fields are not visible, so the code in the OnInsert trigger works. But the code in the OnAfterGetRecord isn't and I don't know how to proceed.

Is it possible what I'm trying and if so how can it be done?

Thanks anyway.

Comments

  • nicolassaleronnicolassaleron Member Posts: 11
    Hello,

    Have you tried to put your code in the OnAfterGetCurrRecord?
  • HatchetHarryHatchetHarry Member Posts: 24
    edited 2019-02-11
    put them in a group and the set the visible on the group. And make sure the boolean is true in the OnInit.
  • MGoosenMGoosen Member Posts: 16
    Hello,
    No, not until you suggested it.
    Unfortunately, it doesn't work either.
  • MGoosenMGoosen Member Posts: 16
    The combination of putting the fields in a group and setting the visible on the group with putting the Case statement in the OnAfterGetCurrRecord trigger did the trick.

    Thanks for the help everyone.
Sign In or Register to comment.