cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Portland
Helper III
Helper III

SharePoint Choice Field (On Plan, Off Plan or At Risk) want to require Multiline text box to contain data if Off Plan or At Risk selected

We have a SharePoint list and I would like to add a Customized form to address 2 fields. A Choice field "Status" with option to select either:

  • On Plan
  • Off Plan
  • At Risk

and a Multi-line text field "Status Explanation".

 

I would like to require the Status Explanation field to require data if the user selects  either Off Plan or At Risk. 

 

How can I do this?

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@Portland 
You can put a Label with a message "Must fill-in Status Explanation" on the canvas with the following code in the Visible property.  My assumption is Status gets selected from a dropdown.

Dropdown1.Selected.Value in ["Off Plan", "At Risk"]

   

Then put this code in the DisplayMode property of your Submit button ti disable it if all the Status Explanation field is not filled

If(Dropdown1.Selected.Value in ["Off Plan", "At Risk"] And !IsBlank(TextInput_StatusExplanation.Text), DisplayMode.Edit, DisplayMode.Disabled)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

1 REPLY 1
mdevaney
Super User
Super User

@Portland 
You can put a Label with a message "Must fill-in Status Explanation" on the canvas with the following code in the Visible property.  My assumption is Status gets selected from a dropdown.

Dropdown1.Selected.Value in ["Off Plan", "At Risk"]

   

Then put this code in the DisplayMode property of your Submit button ti disable it if all the Status Explanation field is not filled

If(Dropdown1.Selected.Value in ["Off Plan", "At Risk"] And !IsBlank(TextInput_StatusExplanation.Text), DisplayMode.Edit, DisplayMode.Disabled)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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