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
Super User

@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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,882)