Hi,
I've a tabbed form and every tab has a toggle. How can I make the fields of a tab view only if the toggle value i true?
In the screenshot below, I want to make the Intake tab and the field from second tab view only if the toggle value is true.
Also, I want to mention my tabs are not separate button. They are different items button from the gallery.
Thanks,
Hi @Anonymous ,
Could you tell me do you want to change a control's mode between edit and view or change a control's visible?
Firstly, you could set a variable as @Anonymous said.
Toggle.OnCheck = UpdateContext({someVariableName: true})
Toggle.UnCheck = UpdateContext({someVariableName: false})
Then, set the control's mode or Visible.
If you want to change its mode between edit and view, then you need to set its DisplayMode to this variable.
If you want to change its visible, then you need to set its Visible to this variable.
What's more, do you mean that your tabs are items in a gallery?
In gallery, you can not use visible to decide an item whether display.
I suggest you use filter function.
Set the gallery's Items:
If(someVariableName,Filter(table, Not(fieldname="intake")),table)
Best regards,
Toggle.OnCheck = UpdateContext({someVariableName: true})
Toggle.UnCheck = UpdateContext({someVariableName: false})
Then, for all the controls you wish make View/Edit:
YourControl.DisplayMode = If( someVariableName, DisplayMode.View, DisplayMode.Edit)
I think some logic along these lines should work for you