I have a SharePoint list that i'm using to track support tickets. I want to create a gallery that will show the last 30 days of items submitted using a specific incident type.
Example would be you click from a drop down a specific icident type called Printers. Then the gallery will show any items submitted to the list with that incident type. Having challenges coming up with the filter formula.
Solved! Go to Solution.
Agreed with @sudeep22169 here.
The formula should be written as:
Filter(TicketList, Type=Dropdown.Selected.value && CreatedDate>=DateAdd(Today(),-30,Days))
More information, see:
Regards,
Michael
Filter(datasource, items = dropdown.selected.value && date = Today()-30 )
This might help you.
Agreed with @sudeep22169 here.
The formula should be written as:
Filter(TicketList, Type=Dropdown.Selected.value && CreatedDate>=DateAdd(Today(),-30,Days))
More information, see:
Regards,
Michael
What would be the best approach to avoid the "Delegation Warning" you would receive with this line of code?
@Anonymous
To avoid the "Delegation Warning" you can use use the FirstN() when you collecting your items.
For example:
ClearCollect(collectionName,FirstN(data source;500); Filter(collectionName, SharePointColumn >= DatePicker1.SelectedDate && SharePointColumn <= DatePicker2.SelectedDate)
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-first-last
I hope this will help you.
Best regards,
PA
@Anonymous
To show the last 30 days and avoid delegation warnings put this code in the OnVisible property of the screen.
Set(var30DaysAgo, DateAdd(Today(),-30,Days))
Then use this code in the Items dropdown of the gallery.
Filter(TicketList, Type=Dropdown.Selected.Value && CreatedDate>=var30DaysAgo)
Note: the code supplied by @PowerAnalytics cannot be delegated.
---
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 |
---|---|
253 | |
113 | |
92 | |
48 | |
38 |