cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ammdaddy
Frequent Visitor

Button visibility based on SharePoint date field

Hi. I'd like to have the visibility of a button dependent on a Sharepoint Date and Time column. Basically, I need the button to show only if the date in the column field has occurred.

 

I tried doing something like this . . .

 

 

Now()>=DateValue('SPList'.'DateColumn') 

 

 

. . . but to no avail. Any help would be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions

Each field on the screen will be in it's own "Card". That card will have a label and the field. Each of those will have unique name.

If you are using what PowerApps gives yo it will be something like DataCardValue3, so your formula will be along the lines of:

Now()>=DataCardValue3.SelectedDate

for whichever data card is displaying your date column

View solution in original post

6 REPLIES 6
BrianS
Super User
Super User

You need to compare it to a particular row in your table. If you are using a Gallery try this in OnSelect:

Set(var_Selected,ThisItem);
Then in the Visible property of the button you can use:
Now()>=var_Selected.DateColumn
 
If you aren't using a gallery, you will just need to specify a particular row
ammdaddy
Frequent Visitor

Thanks BrianS for your reply. The button is actually on a DetailScreen. I'm new to Power Apps. How do I specify a particular row as you suggest?

@ammdaddy  

if your gallery name is galRows on screen1

and your form is on screen2

On selected item on galRows navigate to sceen2 

Set(varNewFormMode,false);Navigate(Screen2)

 

and on sceen2 datasource for the form is your list  and item is going to be as below.

If(!varNewFormMode,galRows .Selected)

 

________________________

If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Thanks Kranthi. I'm a bit more confused than when I started. 🙂   I'm not sure how your suggestion will help show/hide a button based on a the date in a DateTime column. The button's link is already set to navigate to another screen and that works fine. I just need to hide the button until after the date in a date column. 

Each field on the screen will be in it's own "Card". That card will have a label and the field. Each of those will have unique name.

If you are using what PowerApps gives yo it will be something like DataCardValue3, so your formula will be along the lines of:

Now()>=DataCardValue3.SelectedDate

for whichever data card is displaying your date column

View solution in original post

ammdaddy
Frequent Visitor

Thanks for your help BrianS!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (62,843)