cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
oappdev
Advocate V
Advocate V

Bypass Field Required if value is No

I have some fields that are required when they select "Yes" on the form. But would like to bypass the required fields when the users select "No"

 

Hope the community understand the question.

 

Thank you in advance.

 

Capture.PNG

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @oappdev ,

Do you want to control the Required/Mandatory property of the Text Input field based on the Toggle control in your Edit form?

 

Please consider take a try with the following workaround:

Set the Required property of the Text Input field data card in your Edit form to following:

If(
   Toggle.Value = true,
    true,
    false
)

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
yshariff
Advocate I
Advocate I

On the cards required property, you would change it to If(ToggleControl.Value = true, true,false)

 

"ToggleControl" is whatever the name of that field above is. 

mdevaney
Super User III
Super User III

@oappdev 

When I am creating forms I like to take the approach that the question will only appear if the user needs to answer it.  As an alternative to what @yshariff suggested, you could also use his formula in the Visible property of the question and set the Required property to False.

 

If(ToggleControl.Value = true, true,false)

 

v-xida-msft
Community Support
Community Support

Hi @oappdev ,

Do you want to control the Required/Mandatory property of the Text Input field based on the Toggle control in your Edit form?

 

Please consider take a try with the following workaround:

Set the Required property of the Text Input field data card in your Edit form to following:

If(
   Toggle.Value = true,
    true,
    false
)

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (3,104)