Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Custom Sharepoint Online List Form - Change Required Property of a field depending on dropdown value



I'm new in using PowerApps and still trying out new things with it particulary with it's integration with Sharepoint Online.


I'm currently doing this customized sharepoint list form, and there are some conditions where I have to set some fields as Required depending on the selected value in a dropdown. On the column definition I have set this fields as Not Required, and I was thinking I'll just do the validation via powerapp.


At first I tried to do it via the Rule function, but unfortunately you cannot change the field property using the UI.

So I tried to do some reading and tried the following:


I added this condition on the OnSuccess field of the form. I don't have a custom button because with Sharepoint Online the save button is visible and working by default.


If(DataCardValue14_1.Selected.Value = "Study Leave" && IsBlank(DataCardValue24_1.Text), Notify("Event Name is required for Study Leave Request", NotificationType.Error), SubmitForm(NewLeaveRequest_1))

This doesn't do anything.


So what I did is created a new custom form, and added a custom save button, added the code to the OnSelect of that button, and it works on that form. It's weird because,  it isn't working against a default save button, that is what I wanted to achieve..


Is there another way to change the Required property and alert the user that the fields are require? I'm a bit unsure with Notify method because, there are multiple fields that needs to be validated.


Thank you very much in advance.
















Not applicable

adding in @KeremY to review and assist. 



Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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