I am at my wit’s end trying to figure out why these filters will not work. Especially when I first attempted this in a different area of my app, it worked perfectly, but the same data on a different screen with the same setup and filters won’t for some reason.
Backstory: My app is for the employees of the school I work for. One of the many things they can do on it is to submit their absence requests. I currently have the logic/actions to send the requests to their supervisors, and if the supervisor approves them AND they requested a substitute teacher as part of their request, it sends a notification to our sub’s apps that a day is available. The subs can go to their version of the app, view the available days, and mark themself as Interested or Not Interested in working that day. The employees responsible for choosing what sub to use have a screen on their app that shows a calendar. The calendar only displays requests that have been approved by the supervisor, and have a Sub Scheduled status as Pending.
What I’m Trying To Do: When these employees select one of the choices on the calendar, I have an overlay pop up with a summary of that request in a Fields component. Below that is a Collection that displays the list of subs that marked themself Interested in working that request. The filter for that collection is supposed to show only the interested ones where the date of the request matches the date that pulls when the sub completes the Interested/Not Interested submission, and where the Requester on the sub submission matches the Employee name of the absence request.
This setup worked flawlessly when I had it located in a different section of the app, but I had to move it once I realized the area I originally had it in wasn’t meant to be accessible by the employees that choose the subs. Once I moved it though, the filters failed. I have checked everything I can think to check. When I remove the two filters that reference screen data, it shows names again, but they aren’t filtered to show only the ones for that person and date.
Very likely the dates don’t match. Don’t forget that there is always an underlying time associated with a date. The days may match, but the times may not.
Are you sure the filters are identical for the dates? Is one possibly using ‘Within’ instead of ‘Is’?
Can you show the data from the data editor instead of the sheet? Can you show screenshots of filter on the screen that works?
They are both setup as Short Dates and Date Only. The Sub Interested submission actually copies the date field from the absence request they are marking their interest on and shows up in the date field on the sub data.
I can’t show a screenshot of the screen where it was working, because with my confidence that it would work correctly when moved, I went ahead and deleted that Container a couple days ago… Sorry!
No dice.
Even if I remove the date filter it won’t work. It only displays data now if I remove both the filters that reference In Screen data points. But without those two, the list shows all Interested entries for all requests, not just the ones pertaining to the displayed request.
OK. I don’t think you are doing anything wrong that I can see. I have a theory. Let’s try something else. Add two text components to the screen. One to show Requestor and one to show Date Begin. I wonder if the screen values are empty and the Fields component is not sufficient to populate the screen values.
Not that I can explain the reasoning why it does this, but I think I found the cause of the problem.
I think it has something to do with the type of screen the overlay is. It was set up to open as a form screen in the overlay so I could easily add an option for them to select a sub and submit and changing the request from pending to scheduled. However, I just copied my components, then changed the action to open a new screen instead of a form screen. Pasted my component list and now the filters work just fine… I guess I can still accomplish the selection process via an action sequence that edits the fields, so it’s not a problem that it’s not a form screen I guess.
I am curious why this would mess up the filters though, any ideas?
Oh, completely missed that it was a form in your screenshots.
In that case, since you were trying to display a list to select from, you should have used a choice component instead of a collection. Also, if you are just updating an existing row, it should be an Edit form instead of an Add form (maybe it was, but couldn’t tell for sure based on the screenshots).
You can go either way, but an Edit form may be better because that allows a user to easily cancel out if they choose without making changes to the row.
Honestly I would go back to using an Edit form, replace the collection with a choice component, and then use an IF column to return Pending if the substitute column is empty, else return Scheduled. It’s going to be a whole lot easier to set up without extra action sequences.
A form lives in a temporary state. Those filter values were probably empty because in a form they were not populated and not looking at existing row values. When you used the fields component you were pulling from an existing row, but the filter was probably assuming you were adding a new row and those values were not populated.