web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Issue in Search functi...
Power Apps
Unanswered

Issue in Search function where a column is a Sharepoint Person Type Column

(0) ShareShare
ReportReport
Posted on by

Hello

I have a sharepoint list with columns of different type.

  • User - a person type column, which gets the user from the office group
  • Location- a location type column, who store a city information
  • Whatsapp - a number type column
  • Team - a text type column

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

  • ThisItem.User.DisplayName
  • ThisItem.'Location: Name'
  • ThisItem.Whatsapp
  • ThisItem.Team

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

Categories:
I have the same question (0)
  • Silvester. Akakpo Profile Picture
    783 on at

    hi @Antonioclk ,
    use this formula instead.

    Search(myData,SearchBar.Text,"Whatsapp","Team" && User.DisplayName,Location.Name)


    Accept it as a solution if it works.

  • Antonioclk Profile Picture
    on at

    hello, sadly it doesn't works... it seems like won't accept values not in " "

  • Verified answer
    v-yujincui-msft Profile Picture
    on at

    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.

    vyujincuimsft_0-1652426050241.png

    2. Here is my App.

    vyujincuimsft_1-1652426174870.png

    Result Screenshot:

    vyujincuimsft_2-1652426307114.png

     

     

    Best Regards,
    Charlie Choi

  • Antonioclk Profile Picture
    on at

    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?

  • v-yujincui-msft Profile Picture
    on at

    Hi @Antonioclk ,

     

    Try to select the Form and apply the following formula on its Item property as:

    LookUp(datasource,ID=Gallery5.Selected.ID)

    vyujincuimsft_0-1652431473647.png

     

     

     

    Best Regards,
    Charlie Choi

  • Antonioclk Profile Picture
    on at

    ur my hero! thank you so much

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard