I have a gallery that shows a list of programs. I let the user filter the list based on a few columns/fields in the list. What I am finding is somehow the filter seems to get confused and I haven't been able to figure out why. I a pretty sure it was working perfectly when I first did it ()I tested it quite a bit but now that I added more data, it is messing up.
I made a screen shot and color coded the information used in filters. I tried to cover over anything that might be considered confidential.
I can't show it in action but will describe it best I can and what I've tried.
The Red is a person and shows the display name. I had it default to the current user, so the initial list would only show lines with that person assigned. That worked. If I clicked on the 1st or 3rd purple radio buttons, it will filter according, but if I remove them (one or both), the list remans filtered. This only 'seems' to happen when the Red is me. If I choose either of two other people, or remove me, the list changes and filters correctly. I noticed something similar if I choose a Blue status. The purple and blue are both choice fields. The purple radio buttons actually are associated to a hidden combobox that reflects what has been chosen.
I thought maybe the Visible logic was not working right, so I tried adding a text label showing me the true/false values coming from the logic. As long as the label was in the gallery and visible, everything works perfectly, The logic returns what I expect. When I removed that label from the gallery or make it invisible, the filtering doesn't work right. I thought since the label was correct that maybe if I just made it invisible, it would work - yes, I know...a hack...
Here is the Visible property code...it is on the gallery line items that are grouped.
If(
((ThisItem.Status.Value in MSProgComboStatus.SelectedItems.Value) || IsBlank(MSProgComboStatus.SelectedItems) || IsEmpty(MSProgComboStatus.SelectedItems)) &&
(IsBlank(HomeScreenSearchCombo.SelectedItems) || (ThisItem.ServiceType.Value in HomeScreenSearchCombo.SelectedItems.Value) || IsEmpty(HomeScreenSearchCombo.SelectedItems)) &&
( ThisItem.'Service Lead'.DisplayName = ServLeadCombo.Selected.DisplayName || IsBlank(ServLeadCombo.SelectedItems) || IsEmpty(ServLeadCombo.SelectedItems)) &&
( HomeScreenSearchProg.Text in ThisItem.Name || IsBlank(HomeScreenSearchProg.Text) )
,true,false)
The first part goes with the Blue, the second with the purple, and third with Red. The last prt is text and seems to work without issue. It kind of seems the issue involves choice/people comboboxes.
As I mentioned, this seemed to be working perfectly until I added more data and defaulted the person field to the user. I did try taking the default out, but that didn't resolve the issue.
It is quite weird....Any ideas?
what i ended up doing, which seems to have fixed it, was to add a column to my items which was a true/false of the formula above. Then for the gallery, I used the visible property looking at that line's value for the new column. Seems to work.
could this be some sort of delegation issue - although I have NO delegation warnings? I tried making my If statement, nested Ifs to see if that helped but it almost seemed worse. What I notice though is why I ask about delegation...
When I am able to get the gallery to reset (not always simple) for a brief few seconds, the gallery listing will display with the lines all overlapping and then will display correctly. I'm wondering if there is a way to 'slow' down displaying the gallery when the Visible logic is being applied? I thought maybe that's why it seems to work when I added two text labels to see the results of two parts of my above If statement....by displaying those labels it was 'delaying' the gallery display long enough for it to work.
Keep in mind...right now the total of what might be displayed is only 28 lines so no where near delegation limits, but this only seemed to start failing when I went from 3 rows to 28...
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional