cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Level: Powered On

Re: Trouble getting search to work

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

Re: Trouble getting search to work

No, the sharepoint column will only accept one value.

 

However, the the dropdownbox can accept multiple values.

Super User
Super User

Re: Trouble getting search to work

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 317 members 5,871 guests
Please welcome our newest community members: