cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
deepansh_saxena
Helper I
Helper I

Searching gallery items based on multiple Input Controls as keys.

Hi, 

I want to use combination of below keys, "Originator", "Request Type", "Account Manager", "Business Unit", "Customer", "Customer Number", "Customer Status", "Tracking Number" and "Status" to search the record in the gallery.

User can select any number of keys, based on the selections records should be returned. For e.g. If user selects Joe in Originator field, Blog in Account Manager field and Customer Number as 10001 then I should get all the records which have Originator as Joe AND Blog as Account Manager AND Customer Number as 10001.

SearchImage.png

 

Thanks for the help.

Kind Regards,

Deepansh

2 ACCEPTED SOLUTIONS

Accepted Solutions
WarrenBelz
Super User III
Super User III

Hi @deepansh_saxena ,

It should be something like

Filter(
   YourListName,
   Originator = YourOriginatorControlName.Selected.xxxx &&
   'Account Manager'= YourAccountManagerControlName.Selected.xxxx &&
   'Customer Number' = YourCustomerNoControl.Text
)

xxxx above references from drop-down and combo box controls depend on the Items property of the control.

When you type YourControlName.Selected. (note second dot), valid values will come up underneath. For some guidance of what they mean: -

    • If your Items are Choices(ListName.FieldName) - a Choices or Lookup field), the reference will be YourControlName.Selected.Value
    • If they are Distinct( . . .  .), it will be YourControlName.Selected.Result
    • The other option is when they are based on a field value in a list (other than Distinct), then it will be YourControlName.Selected.FieldName (actual field name)

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

Hi @deepansh_saxena ,

Back in my timezone now - if you want Text controls, then do this

Filter(
   YourListName,
   StartsWith(Originator,YourOriginatorControlName.Text) &&
   StartsWith('Account Manager',YourAccountManagerControlName.Text) &&
   StartsWith('Customer Number' = YourCustomerNoControl.Text)
)

You need to make sure the Default of the text search boxes is "" (empty string) so all items display from the target field until something is typed in.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

5 REPLIES 5
WarrenBelz
Super User III
Super User III

Hi @deepansh_saxena ,

It should be something like

Filter(
   YourListName,
   Originator = YourOriginatorControlName.Selected.xxxx &&
   'Account Manager'= YourAccountManagerControlName.Selected.xxxx &&
   'Customer Number' = YourCustomerNoControl.Text
)

xxxx above references from drop-down and combo box controls depend on the Items property of the control.

When you type YourControlName.Selected. (note second dot), valid values will come up underneath. For some guidance of what they mean: -

    • If your Items are Choices(ListName.FieldName) - a Choices or Lookup field), the reference will be YourControlName.Selected.Value
    • If they are Distinct( . . .  .), it will be YourControlName.Selected.Result
    • The other option is when they are based on a field value in a list (other than Distinct), then it will be YourControlName.Selected.FieldName (actual field name)

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

Hi @WarrenBelz ,

Thank You for replying back to me. I have few controls of type free text, for e.g. Originator, Account Manager, Customer and Customer Number where user has to input text. If I use your below code then in all these fields I have to type complete data so that it could be filtered for e.g. in Originator field I have to enter "Deepansh Saxena" to filter the record, my user do not want this.

He can type First Name in Originator field, Second Name in Account Manager's field and want the record which contains this result. Is this possible?

Thank You.

Regards,

Deepansh Saxena

If in my requirement I could change free text input fields to Dropdowns than this solution is perfectly working well.
New screen looks like below:

DropDowns.png



Thank You @WarrenBelz, This solution should definitely be marked as Accepted so it benefit others who could have requirement to filter records based on Dropdowns.

Kind Regards,

Deepansh Saxena

Hi @deepansh_saxena ,

Back in my timezone now - if you want Text controls, then do this

Filter(
   YourListName,
   StartsWith(Originator,YourOriginatorControlName.Text) &&
   StartsWith('Account Manager',YourAccountManagerControlName.Text) &&
   StartsWith('Customer Number' = YourCustomerNoControl.Text)
)

You need to make sure the Default of the text search boxes is "" (empty string) so all items display from the target field until something is typed in.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

@WarrenBelz  Thank You so much for your help, it worked.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,355)