web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Set a field visible an...
Power Apps
Unanswered

Set a field visible and required based on toggle field

(1) ShareShare
ReportReport
Posted on by

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.

 

2023-04-21_12-23-21.gif2023-04-21_12-19-51.png

 

Categories:
I have the same question (0)
  • MaximusDecimus Profile Picture
    281 on at

    Hi @ggr66 ,

     

    Should be able to first set the Visible property for your data card to:

    DataCardValue12.Value

    The 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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard