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

 

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,253)