Efficiently Filter Tomorrow’s Date in Power Apps Gallery!
Overview:
This tutorial elucidates how users can proficiently filter a gallery in Power Apps to exclusively showcase dates matching tomorrow, using data sourced from a SharePoint list titled ‘Calendar Dates’.
Data Source Introduction
The core data is sourced from ‘Calendar Dates’, a SharePoint list populated with dates ranging from January 1, 2018, to December 31, 2024, culminating in a total of 2,557 rows.
Title DateEntry
Monday,January 1, 2018 1/1/2018
Tuesday,January 2, 2018 1/2/2018
Tuesday,December 31, 2024 12/31/2024
Thursday,June 17, 2023 6/17/2023
Code Implementation
To achieve the desired filter functionality, utilize the following code within the Items property of your gallery:
With(
{ InitialDate: Today(),
FollowingDate: Today() + 1
},
Filter(
'Calendar Entries',
DateEntry > InitialDate,
DateEntry <= FollowingDate
)
)
The logic behind this is straightforward. The code filters the dates that are greater than today but less than or equal to tomorrow.
Expected Outcome
Post implementation, your gallery will exclusively display rows having a date that matches tomorrow. For illustration, considering the current date as 6/16/2023, the gallery would reflect:
Title DateEntry
Thursday,June 17, 2023 6/17/2023
Relevant Data:
- Data Source: The primary data is sourced from a SharePoint list named ‘Calendar Dates’ with dates from 2018-2024.
- Total Rows: There are a total of 2,557 rows in this list.
- Code Purpose: The provided code is used to filter out only the date that matches tomorrow from the SharePoint list.
- Expected Behavior: After code implementation, the gallery will only show entries with tomorrow’s date.
- Use Case: If the current date is 6/16/2023, the gallery will display the entry for 6/17/2023.
Conclusion
Through Power Apps, users can adeptly filter date-specific entries, enriching the application’s user experience. For any technical queries or guidance on implementation, our proficient team is always ready to assist.