Hello
I have a sharepoint list with columns of different type.
In my power app i have a gallery who uses a sharepoint connector to grab data from the list.
the labels of my gallery are
I have no problem in visualizing the data but i do have issues when i try to search.
On the Items property of my gallery i have the following function. if i just use the following code it works fine.
Search(myData,SearchBar.Text,"Whatsapp","Team")
But i need to search also by User.DisplayName/Location.City and when i try to add them it doesn't work.
Search(myData,SearchBar.Text,"Whatsapp","Team",User.DisplayName,Location.Name)
this is how i tried, what am i doing wrong?
Thank you so much
ur my hero! thank you so much
Hi @Antonioclk ,
Try to select the Form and apply the following formula on its Item property as:
LookUp(datasource,ID=Gallery5.Selected.ID)
Best Regards,
Charlie Choi
That's great! it worked! but sadly while it fixed my search function, seems like it broke my detail form.
the gallery has onSelected Navigate(DetailScreen, Cover). It opens a screen with a Detail Form, where my item property is set with Gallery.Selected.
It was working but now it gives me an error "invalid formula. Expected a value compatible with "DataSource". Should i cast the value or something like that?
Hi @Antonioclk ,
Try to use the following formula:
Search(AddColumns(datasource,"UserDisplayName",User.DisplayName,"LocationName",'Location: Name',"WhatsappText",Text(Whatsapp)),SearchBar.Text,"WhatsappText","Team","UserDisplayName","LocationName")
I have made a test for your reference.
1. Here is my list.
2. Here is my App.
Result Screenshot:
Best Regards,
Charlie Choi
hello, sadly it doesn't works... it seems like won't accept values not in " "
hi @Antonioclk ,
use this formula instead.
Search(myData,SearchBar.Text,"Whatsapp","Team" && User.DisplayName,Location.Name)
Accept it as a solution if it works.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2