cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ShadowTech
Post Prodigy
Post Prodigy

How to search a choice field from within a text input

How can I run a search in a text input for a choice field from a SharePoint list as the data source. This is a gallery.

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @ShadowTech ,

Note the below is not Delegable

Filter(
   AddColumns(
      DataSource,
      "WhateverName",
      YourChoiceField.Value
   ),
   YourTextBoxName in WhateverName
)

 

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

6 REPLIES 6
rizkyaditya
Resolver III
Resolver III

Hello @ShadowTech ,

 

You might consider this post as your answer : Search a SharePoint "Choice" column in Power Apps? 

WarrenBelz
Super User
Super User

Hi @ShadowTech ,

Note the below is not Delegable

Filter(
   AddColumns(
      DataSource,
      "WhateverName",
      YourChoiceField.Value
   ),
   YourTextBoxName in WhateverName
)

 

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.

@WarrenBelz What would be your recommendation on inserting it in my current formula?

 

Sort(
    Filter(
        Search(
            'Freight-Damage',
            SearchBox.Text,
            "ClaimNumber",
            "Vendor_x0028_Origin_x0029_"
        ),
        If(
            Dropdown1.Selected.Value = "All",
            true,
            Branch.Value = Dropdown1.Selected.Value
        ),
        If(
            Dropdown2.Selected.Value = "All",
            true,
            'Claim Status'.Value = Dropdown2.Selected.Value
        )
    ),
    Created,
    Descending
)

 

Thanks in advance.

@WarrenBelz So I got it working but broke something else. I have a display form based on the "Gallery2.Selected" (This gallery) but now shows no data when a record is selected in the Gallery. Recommendations?

 

Sort(
    Filter(
        Search(
            AddColumns(
                'Freight-Damage',
                "BranchLook",
                Branch.Value
            ),
            SearchBox.Text,
            "ClaimNumber",
            "Vendor_x0028_Origin_x0029_",
            "BranchLook"
        ),
        If(
            Dropdown1.Selected.Value = "All",
            true,
            Branch.Value = Dropdown1.Selected.Value
        ),
        If(
            Dropdown2.Selected.Value = "All",
            true,
            'Claim Status'.Value = Dropdown2.Selected.Value
        )
    ),
    Created,
    Descending
)

 

Thanks in advance.

@WarrenBelz Figured it out. You now have to have the forms perform a lookup of the ID.

Hi @ShadowTech ,

I would be inclined to go this way

Sort(
   Search(
      Filter(
         'Freight-Damage',    
          (
              Dropdown1.Selected.Value = "All" || 
              Branch.Value = Dropdown1.Selected.Value
          ),
          (
             Dropdown2.Selected.Value = "All" ||
             'Claim Status'.Value = Dropdown2.Selected.Value
          )
      ),
      SearchBox.Text,
      "ClaimNumber",
      "Vendor_x0028_Origin_x0029_"
   ),
   Created,
   Descending
)

 

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.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,600)