web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details
Power Apps - Building Power Apps
Answered

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

Like (0) ShareShare
ReportReport
Posted on 12 May 2022 14:15:08 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

I have the same question (0)
  • Silvester. Akakpo Profile Picture
    783 on 12 May 2022 at 15:29:16
    Re: Issue in Search function where a column is a Sharepoint Person Type Column

    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 13 May 2022 at 06:32:58
    Re: Issue in Search function where a column is a Sharepoint Person Type Column

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

  • Verified answer
    v-yujincui-msft Profile Picture
    on 13 May 2022 at 07:19:03
    Re: Issue in Search function where a column is a Sharepoint Person Type Column

    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 13 May 2022 at 08:32:22
    Re: Issue in Search function where a column is a Sharepoint Person Type Column

    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 13 May 2022 at 08:45:09
    Re: Issue in Search function where a column is a Sharepoint Person Type Column

    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 13 May 2022 at 09:01:28
    Re: Issue in Search function where a column is a Sharepoint Person Type Column

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 714 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 243

Last 30 days Overall leaderboard
Loading complete