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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Complex Search Function
Power Apps
Unanswered

Complex Search Function

(0) ShareShare
ReportReport
Posted on by 141

So I have a search function which searches my gallery for records with the "playersStatus", and "TeamName". But I want to add another field however the field I want to add is "playersName" but I had to create a lookup function to find the playersName so how can I add the "playersName" field to my search function? 

 

The lookup function for "playersName" is "LookUp(Players, PlayerId = ThisItem.PlayerId, PlayerName)"

Categories:
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @donnacha :

    Could you please show me how do you search the gallery?

    Where is this formula?(Which control/property)

    LookUp(Players, PlayerId = ThisItem.PlayerId, PlayerName)

    Best Regards,

    Bof

  • donnacha Profile Picture
    141 on at

    Search(Campaign,SearchCampaignsTextInput.Text,"CampaignStatus","DisplayName") is what I have in my search function.

    The formula is in my Gallery "items" property 

  • zmorek Profile Picture
    3,272 on at

    Try this as your Items() property on your gallery; it uses AddColumns() to lookup the person's name, which should then be searchable.

     

    Search(

    AddColumns(Campaign As wCampaign,"columnPerson",LookUp(Players, PlayerID = wCampaign.PlayerID, PlayerName)),

    SearchCampaignsTextInput.Text,

    "CampaignStatus","DisplayName","columnPerson"

    )

  • donnacha Profile Picture
    141 on at

    So if I understand this correctly the AddColumns() function creates a new column named "columnPerson" but what is wCampaign?

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @donnacha :

    You could try:

    Filter(
     Campaign,
     SearchCampaignsTextInput.Text in CampaignStatus ||
     SearchCampaignsTextInput.Text in DisplayName ||
     LookUp(Players, PlayerId = ThisItem.PlayerId, PlayerName) in DisplayName
    )

    Best Regards,

    Bof

  • donnacha Profile Picture
    141 on at

    Hi @v-bofeng-msft 

    I tired the filter function however it came back with the error that is in the image 

    error.PNG
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @donnacha :

     

    The point is 'in' is not delegable. However ,'Search' is not delegable two, so it is not matter.

     

    Best Regards,

    Bof

  • donnacha Profile Picture
    141 on at

    So what should I use to allow the user to search? 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard