Hello,
I've built a simple test app for logging incidents and need to add a filtering option on the Gallery (galIncidents).
I have two combo boxes (ddAssignedToo & ddStatus) to search the columns with the same name.
I have one Text Input (inpIncSearchBox) for searching the DescriptionOfProblem Column.
Items for ddStatus:
["","Open","Completed","Cancelled","Rejected","Amendments Required","Initial Approval Complete","Approved","Pending Approval","In Progress", "On Hold"]
Items for ddAssignedToo:
["","DisplayName1","DisplayName2"]
I'm looking for all records to be displayed unless one or more of the above combo boxes or the text input is filled in.
I hope this makes sense and any help would be much appreciated
Solved! Go to Solution.
Consider the following formula for the Items property of your Gallery:
Search(
Filter(yourDataSource,
(IsBlank(ddStatus.Selected.Value) || Status = ddStatus.Selected.Value) &&
(IsBlank(ddAssignedToo.Selected.Value) || AssignedToo = ddAssignedToo.Selected.Value)
),
inpIncSearchBox.Text, DescriptionOfProblem
)
That's the basic structure.
Now...I am guessing that Status is a choice column and AssignedTo is a Person column. If so, then the following:
Search(
Filter(yourDataSource,
(IsBlank(ddStatus.Selected.Value) || Status.Value = ddStatus.Selected.Value) &&
(IsBlank(ddAssignedToo.Selected.Value) || AssignedToo.DisplayName = ddAssignedToo.Selected.Value)
),
inpIncSearchBox.Text, DescriptionOfProblem
)
I hope this is helpful for you.
Also this list is not delegated, it will always have less than 2000 records, not sure if this is relevant or not at this point...
Consider the following formula for the Items property of your Gallery:
Search(
Filter(yourDataSource,
(IsBlank(ddStatus.Selected.Value) || Status = ddStatus.Selected.Value) &&
(IsBlank(ddAssignedToo.Selected.Value) || AssignedToo = ddAssignedToo.Selected.Value)
),
inpIncSearchBox.Text, DescriptionOfProblem
)
That's the basic structure.
Now...I am guessing that Status is a choice column and AssignedTo is a Person column. If so, then the following:
Search(
Filter(yourDataSource,
(IsBlank(ddStatus.Selected.Value) || Status.Value = ddStatus.Selected.Value) &&
(IsBlank(ddAssignedToo.Selected.Value) || AssignedToo.DisplayName = ddAssignedToo.Selected.Value)
),
inpIncSearchBox.Text, DescriptionOfProblem
)
I hope this is helpful for you.
Many thanks for taking the time to reply @RandyHayes,
I've tested this and the Text Input works a treat but I still cant get the dropdowns to work, it doesn't error but just brings back a blank list when I select anything in either dropdown? I've confirmed that the Combo box selections do match what's in each list column. Would it be anything to do with them being Combo boxes and not Dropdowns? I know I've called them ddAssignedToo & ddStatus but they are Combo boxes, NOT dropdowns.
Search(
Filter(IncidentRequestList,
(IsBlank(ddStatus.Selected.Value) || Status.Value = ddStatus.Selected.Value) &&
(IsBlank(ddAssignedToo.Selected.Value) || AssignedTo.DisplayName = ddAssignedToo.Selected.Value)
),
inpIncSearchBox.Text, "ShortTitle"
)
Converted to DropDowns and its now all working a treat, thank you so much again!
Another cheeky question if possible? How would I go about making it display everything except 'Completed' items if the dropdown and search box are empty?
You can incorporate pretty much anything you want into the criteria of the filter.
I believe you might be looking for this:
Search(
Filter(IncidentRequestList,
(IsBlank(ddStatus.Selected.Value) || Status.Value = ddStatus.Selected.Value) &&
(IsBlank(ddAssignedToo.Selected.Value) || AssignedTo.DisplayName = ddAssignedToo.Selected.Value) &&
(IsBlank(ddStatus.Selected.Value) &&
IsBlank(ddAssignedToo.Selected.Value) &&
IsBlank(inpIncSearchBox.Text) &&
!(Status.Value = "Completed")
)
),
inpIncSearchBox.Text, "ShortTitle"
)
I cant get that to work as is, but I will certainly have a play with the formula, many thanks again for your time on this one, it really is much appreciated when people like yourself take the time to help us lesser knowledgeable souls to enjoy tinkering with PowerApps without having to spend the time on it I'm sure you have over the years to become an expert!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
202 | |
98 | |
60 | |
57 | |
52 |
User | Count |
---|---|
257 | |
161 | |
87 | |
79 | |
68 |