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 / Trouble getting search...
Power Apps
Unanswered

Trouble getting search to work

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I currently have a filter which looks like this:

Filter(
If(StatusValue="Drafts",Filter('Enquiries List',Status.Value="Draft"),If(StatusValue="Submitted",Filter('Enquiries List',Status.Value="Submitted"),If(StatusValue="Approved",Filter('Enquiries List',Status.Value="Approved"),If(StatusValue="Quotes",Filter('Enquiries List',Status.Value="Quotes"),If(StatusValue="Feedback",Filter('Enquiries List',Status.Value="Feedback"),If(StatusValue="Gate 1",Filter('Enquiries List',Status.Value="Gate 1"),If(StatusValue="Launched",Filter('Enquiries List',Status.Value="Launched"),If(StatusValue="Declined",Filter('Enquiries List',Status.Value="Declined"),If(StatusValue="Archived",Filter('Enquiries List',Status.Value="Archived"),'Enquiries List'))))))))),Requested_x0020_By.DisplayName in RequestedByDropDown.SelectedItems)

 

When the dropdown (RequestedByDropDown) is blank I get no results (as designed). What I want is to return all values, and then just those that match the values in RequestedByDropDown. For this I think I should be using the search function. I have therefore tried:

Search(
If(StatusValue="Drafts",Filter('Enquiries List',Status.Value="Draft"),If(StatusValue="Submitted",Filter('Enquiries List',Status.Value="Submitted"),If(StatusValue="Approved",Filter('Enquiries List',Status.Value="Approved"),If(StatusValue="Quotes",Filter('Enquiries List',Status.Value="Quotes"),If(StatusValue="Feedback",Filter('Enquiries List',Status.Value="Feedback"),If(StatusValue="Gate 1",Filter('Enquiries List',Status.Value="Gate 1"),If(StatusValue="Launched",Filter('Enquiries List',Status.Value="Launched"),If(StatusValue="Declined",Filter('Enquiries List',Status.Value="Declined"),If(StatusValue="Archived",Filter('Enquiries List',Status.Value="Archived"),'Enquiries List'))))))))),

RequestedByDropDown.SelectedItems,

Requested_x0020_By)

 

The problem seems to be with the last value "Requested_x0020_By". Powerapp doesn't seem to like it. It is a column in sharepoint list that is either a person or group.

 

Any suggestions?


Thanks, James

 

Categories:
  • izlove Profile Picture
    13 on at

    Is the column set to allow mulitple people or groups? I've noticed that both PowerApps and Flow have trouble if multiple values are allowed

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    No, the sharepoint column will only accept one value.

     

    However, the the dropdownbox can accept multiple values.

  • Shanescows Profile Picture
    2,218 Most Valuable Professional on at

    I haven't tested this but my first guess is you need to change your line to add DisplayName so Requested_x0020_By.DisplayName since that is what you used in the Filter. Sorry, about to jump on a call so I cannot recreate it all but that is where I would start. Create a new screen and get rid of all of the complexity and try to make it just work with simple text against Requested By. Then plug that into mega function.

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 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard