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
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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. 

Responsive Resident
Responsive Resident

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
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (8,178)