I'd like to display a gallery in Powerapps based on any items added in the last 7 days.
I'm trying to use a filter
Something like this
Filter([@'Making a Difference Awards'], "Created">= -7,Descending)
I need help knowing how to get the last 7 days from the list.
You can use the DATEADD function to subtract 7 days from the current date. See my code below.
Filter([@'Making a Difference Awards'], Created>= DateAdd(Today(),-7,Days),Descending)
Link to MS Docs for DATEADD
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Thanks for your help.
I'm getting a delegation warning using this code.
Yeah... dates do not yet have the ability to be delegated in SharePoint.
https://powerapps.microsoft.com/en-us/blog/sharepoint-delegation-improvements/
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
So are you saying I can't do what I'm hoping to do ... yet?
Date delegation is coming (supposedly). We have to find workarounds in the meantime...
If your number of results are not expected to exceed the delegation limit of 2,000 you could use this code instead. There will be delegation warnings but you can safely ignore them.
Filter(
Sort(
[@'Making a Difference Awards'],
Created,
Descending
),
Created>= DateAdd(Today(),-7,Days)
)
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Did I answer your question here?
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
User | Count |
---|---|
224 | |
100 | |
94 | |
57 | |
31 |
User | Count |
---|---|
281 | |
115 | |
110 | |
63 | |
57 |