I'm building a Power Apps application with a screen (TimeCardApprovals) that displays a list of time card entries for a manager's team. The entries are pulled from a data source (TimeEntries) and include fields like Title, WeekStart, EmployeeTxt (employee name), Status.Value (status of the entry), and Manager.Email. The goal is to filter and display entries based on the selected employee, time card title, and status.
Requirements
- Filter Data Based on Selected Item: When a user clicks an arrow (
NextArrow5) next to a time card in a gallery, it should set that item as the "selected" time card (selectedTimeCard) and navigate to another screen (TimeCardContinue). - Dynamic Filtering on the Target Screen: On the
TimeCardContinuescreen, I want to filter theTimeEntriesdata based on the properties ofselectedTimeCard(likeTitleandEmployeeTxt) and the status passed through a variable (varStatus). - Interactive Filtering on the Main Screen: On the main screen (
TimeCardApprovals), I'd like to add additional dropdowns for filtering by status, employee, and possibly by date, to dynamically update the displayed data based on the user's selections.
Current Setup
-
OnSelect for
NextArrow5:- Sets
selectedTimeCardto the current item (ThisItem) in the gallery. - Navigates to
TimeCardContinue, passingvarStatusbased on the currently selected tab.
- Sets
-
OnVisible for
TimeCardContinue:- Attempts to filter
TimeEntriesbased onselectedTimeCardproperties (TitleandEmployeeTxt) andvarStatus. - The filtered data is stored in a collection (
selectedTimeEntries), which is bound to the gallery on theTimeCardContinuescreen.
- Attempts to filter
Problems Encountered
- Field Not Recognized (
EmployeeTxt):selectedTimeCard.EmployeeTxtis not always recognized or accessible. It appears as ifEmployeeTxtis sometimes not present inselectedTimeCard, causing filtering issues.
- Inconsistent Filtering Behavior:
- When the
TimeCardContinuescreen loads, theselectedTimeEntriescollection does not consistently reflect the correct, filtered data. Entries from other employees or statuses sometimes appear, indicating a filtering issue.
- When the
- Dynamic Filtering Complexity:
- Adding dropdown filters (e.g., for status and employee) on the main screen to further refine the entries displayed has introduced complexity. The goal is for these filters to update
selectedTimeEntriesin real-time as users make new selections.
- Adding dropdown filters (e.g., for status and employee) on the main screen to further refine the entries displayed has introduced complexity. The goal is for these filters to update
Attempts to Resolve
-
Field Verification:
- Verified field names in
TimeEntriesand ensured thatEmployeeTxtandTitleexist and match exactly. However,EmployeeTxtis still inconsistently accessible fromselectedTimeCard.
- Verified field names in
-
Debugging with Labels:
- Added temporary labels to display
selectedTimeCard.TitleandselectedTimeCard.EmployeeTxt, confirming that these fields sometimes don’t populate as expected.
- Added temporary labels to display
-
Workaround Attempts:
- Tried setting
selectedTimeCardin various ways and wrapping fields inText()to enforce type compatibility, but without consistent success.
- Tried setting
Desired Outcome
- Reliable Filtering: Ensure that when navigating to
TimeCardContinue, only entries related to the selected employee (EmployeeTxt), time card title (Title), and status (varStatus) appear inselectedTimeEntries. - Dynamic User Filtering: Allow users to filter
TimeEntriesdynamically on the main screen (TimeCardApprovals) using dropdowns forStatus,Employee, and possibly date range, with results updating in real-time.
Community Help Needed
I'm looking for advice on:
- Ensuring Consistent Access to
selectedTimeCard.EmployeeTxtfor reliable filtering. - Best Practices for Setting and Using Filtered Collections across screens in Power Apps, especially with complex filtering criteria.
- Dynamic Filtering Techniques that allow users to interactively adjust filters on the main screen and have the gallery update immediately.
Any insights or workarounds that could help resolve these filtering issues would be greatly appreciated!

Report
All responses (
Answers (