cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to hide a label unless under certain conditions

Hi,

 

I am creating a workflow intake for my team. In this PowerApps form, there is a choice for the user to select a due date. I want to make sure the user is unable to choose a due date that is, at the least, two days away.

 

I have seen some use a label that appears when an improper date is chosen. I have also seen some block the submit function when an improper due date is chosen.

 

Attached is my current form. The circled red text is what I would like to appear given the user chooses an improper due date.

 

Thank you.

 

Regards,

 

William

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: How to hide a label unless under certain conditions

Hi @Anonymous,

 

You can insert a label control:

Label1.Text="*Please choose a date after today"
Label1.Visible=If(DataCardValue17.SelectedDate>Today()+1,true,false)
Label1.Color=RGBA(255, 0, 0, 1)

Notice that DataCarValue17 is the date picker control's name in the form.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 REPLY 1
Community Support Team
Community Support Team

Re: How to hide a label unless under certain conditions

Hi @Anonymous,

 

You can insert a label control:

Label1.Text="*Please choose a date after today"
Label1.Visible=If(DataCardValue17.SelectedDate>Today()+1,true,false)
Label1.Color=RGBA(255, 0, 0, 1)

Notice that DataCarValue17 is the date picker control's name in the form.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 211 members 5,569 guests
Please welcome our newest community members: