
Announcements
Search issue on inner gallery.
I have nested gallery. I was implementing Search but the formula which I implemented searches on the outer gallery but not inner gallery.
The backend is the webapi service which gives me data in this format -
"alerts": [
{
"plantName": "aaaaa",
"areaId": 1,
"areaName": "bbbbbb",
"processGroupId": 1,
"processGroupName": "cccccc",
"id": 1,
"name": "xyz",
"date": "5/15/2018 12:00:00 PM",
"signalDuration": 6,
"status": "NEW",
"isObserved": false,
"intensity": 0.243681192,
"causes": null,
"tags": [
{
"id": 17298,
"name": "abc",
"description": "new sensory tag",
"state": "Critical",
"unit": "PPM"
}
Outer gallery is binded to collection "AllAlerts" which displays process group name.
Inner sub gallery is binded to ThisItem.tags (to get names under tags list as shown in above format) in inner gallery.
Outer gallery items are binded to the below formula
Search(
AllAlerts,
PlantAlertSearchBox.Text,"name")
Inner gallery items are binded to the below formula
Search(ThisItem.tags,PlantAlertSearchBox.Text,"name")
Label inside the inner gallery's Text property is set to name.
When I type in PlantAlertSearchBox , Search always happens on outer gallery i.e it checks in the outer gallery name and does not search on inner gallery.What am I missing here ? Can someone help . Thanks.
Hi, @RoopaPendyala
Could you please share more details about you data structure?
Because there are two additional records in the screen shot “def” and “mno”.
And what data do you want to display in the outer gallery and inner gallery?
I have created a PowerApp based on your data and the formula worked fine.
If you type nothing the outer gallery will display “xyz” and inner displayed all “tags”.
If you type “xyz” in search box the outer gallery will display the match record “xyz” included in “Alerts”.
If the “tags” don’t contain “xyz” the inner gallery will display nothing otherwise display only the tags contains “xyz”.
Regards,
Zheng