cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Trouble getting search to work

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

 

3 REPLIES 3
izlove
Frequent Visitor

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

Anonymous
Not applicable

No, the sharepoint column will only accept one value.

 

However, the the dropdownbox can accept multiple values.

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.

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,349)