cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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

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

Thanks for your help BrianS!

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (93,991)