
Announcements
Hi,
I'm trying to make a new form in PowerApps and have a toggle button with Yes/No option, I want to display and set required 3 fields based in the selection of this toggle, if Yes, then display the fields and set them required, if No, then not display the fields are are not required.
The Visible property of each field is set as below:
If(DataCardValue12.Value = true, true)
So I set the Required property of each field as the same
If(DataCardValue12.Value = true, true)
So when running the form, the fields appear as Required, so if I set the toggle as No, the fields dissappear, however, when filling up the rest of the fields and trying to save, it request for the value on the hidden fields, so I tried to set the Required property as:
If(DataCardValue12.Selected.Value = true, true)
However, is not accepting the Selected keyword, so not sure how to proceed and make those fields visible and required based on the Yes selection only.
Hi @ggr66 ,
Should be able to first set the Visible property for your data card to:
DataCardValue12.ValueThe toggle will output true if toggled and false if not, so that's why the above will work. Now using the same logic you can set your Required property to the same as above.