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

Make a field required if a value < 100

Hi all,

this should be an easy one, but not for me 🙂

 

I want to make a  person field required, if a number field is >100.

I found this one:

If(DataCardValue3.Text = "",true,false)

But this, probably because of the .Text ending just work, if it´s equal to 100.

I cant write it like:   "If(DataCardValue3.Value > 100,true,false)"  even DataCardValue3 is a number field.

Data source is a SP list.

 

Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User III
Super User III

Try:

If(Value(DataCardValue3.Text) > 100,true,false)

 

If you get error, give a screen shot

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

2 REPLIES 2
eka24
Super User III
Super User III

Try:

If(Value(DataCardValue3.Text) > 100,true,false)

 

If you get error, give a screen shot

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

KrishnaV
Super User III
Super User III

Hi @YoYo1982 ,

 

On Submit button DispalyMode write the below formula:

If(DataCardValue3.Value > 100 And IsBlank(personfiledControl),DisplayMode.disabled;UpdateContext({varErrorMsg:"Person field is Required"}),DisplayMode.Edit;UpdateContext({varErrorMsg:" "}));

This will make the submit button disable if the value >100 and person field control is blank.

Add a Lable and set the text property of that label as below:

varErrorMsg

 
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,340)