cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
fzer0
Level: Powered On

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
Community Support Team
Community Support Team

Re: Set field to required using rules

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
Community Support Team
Community Support Team

Re: Set field to required using rules

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

fzer0
Level: Powered On

Re: Set field to required using rules

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
Level: Powered On

Re: Set field to required using rules

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

DCI_18
Level: Powered On

Re: Set field to required using rules

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,823)