cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
fzer0
Helper I
Helper I

Set field to required using rules

How can I set field to 'required' using rules?

Very simple case: I have sharepoint list on which I build submit form. I want the field "Date" to be required when another field "Deadline" (list type) is set to "Yes".

 

I set condition with field's "Deadline" value set to "Yes", but when I want to setup an action, Required property is greyed out

screen.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
v-yuxima-msft
Community Support
Community Support

Hi @fzer0 ,

 

Do you want to when field of deadline is filled “Yes”, the field of date need to be required?

The property of the datacard is grey before you unlock the datacard,so if you want to add condition for the property ,you need to unlock the datacard firstly.

Unlock datacard:

20190301unlockdatacard1.jpg

Date_DataCard3: If(DataCardValue11.Selected.Value ="Yes",true,false) 

20190301formulaexpression1.jpg

 

Result test:

20190301Set field to required using rulesgif2.gif

 

Hope this can be helpful.

Best Regard.

Yumia

 

View solution in original post

4 REPLIES 4
v-yuxima-msft
Community Support
Community Support

Hi @fzer0 ,

 

Do you want to when field of deadline is filled “Yes”, the field of date need to be required?

The property of the datacard is grey before you unlock the datacard,so if you want to add condition for the property ,you need to unlock the datacard firstly.

Unlock datacard:

20190301unlockdatacard1.jpg

Date_DataCard3: If(DataCardValue11.Selected.Value ="Yes",true,false) 

20190301formulaexpression1.jpg

 

Result test:

20190301Set field to required using rulesgif2.gif

 

Hope this can be helpful.

Best Regard.

Yumia

 

View solution in original post

Thanks, it works:).

 

However, it does not work when you use "Rules", it has to be put as formula (as it is in your example).

ChinoDoesStuff
Advocate II
Advocate II

I recently posted a short tutorial on the subject of using Rules in PowerApps for data validation. I think it may be useful for you.

 

https://youtu.be/9IgGn0adhtA

Hi Yumia @v-yuxima-msft ,

 

I also tried your recommended solution and its not working. The issue with the formula in powerapps seems to be the Selected.Value ="Yes" part.

 

I am trying to make a field required based on another field and not having any success.

 

If('Is this PO for a Vendor or Subcontractor?'.Selected.Value = "Vendor",true,false)

 

Is this PO for a Vendor or Subcontractor?: the data card of previous field

Vendor: the selection of the data card identified above.

 

Attached the screenshot.

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,024)