cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DAVIDPOWELL Post Patron
Post Patron

radio button choices and filter based on radio selection

I have a search box called  "FilterTextBox"

I have a radio button with 3 choices

Brand

Supplier_Name

Supplier_Number

 

I'm using this formula in the "Items" property for a Gallery1 

Filter(v_sst_source_select_search,StartsWith(Supplier_Name,FilterTextBox.Text))

What I need:

If i choose "Brand" in the radio option choice: then use

Filter(v_sst_source_select_search,StartsWith(Brand,FilterTextBox.Text))

If i chose Supplier_Name then

Filter(v_sst_source_select_search,StartsWith(Supplier_Name,FilterTextBox.Text))

If i choose Supplier_Number then:

Filter(v_sst_source_select_search,StartsWith(Supplier_Number,FilterTextBox.Text))

 

something like this ?

If(Radio1.Selected.Value = "Brand", Filter(v_sst_source_select_search,StartsWith(Brand,FilterTextBox.Text)),
Radio1.Selected.Value ="Supplier_Name", Filter(v_sst_source_select_search,StartsWith(Supplier_Name,FilterTextBox.Text)),
Radio1.Selected.Value = "Supplier_Number", Filter(v_sst_source_select_search,StartsWith(Supplier_Number,FilterTextBox.Text)))

 

 

 

 

Thanks

David

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz Community Champion
Community Champion

Re: radio button choices and filter based on radio selection

HI @DAVIDPOWELL ,

Try

Filter(
   v_sst_source_select_search,
   If(
      Radio1.Value = "Brand",   
      StartsWith(Brand,FilterTextBox.Text),
      Radio1.Value = "Supplier_Name",   
      StartsWith(Supplier_Name,FilterTextBox.Text),
      Radio1.Value = "Supplier_Number",   
      StartsWith(Supplier_Number,FilterTextBox.Text)
   )
)

 

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

1 REPLY 1
WarrenBelz Community Champion
Community Champion

Re: radio button choices and filter based on radio selection

HI @DAVIDPOWELL ,

Try

Filter(
   v_sst_source_select_search,
   If(
      Radio1.Value = "Brand",   
      StartsWith(Brand,FilterTextBox.Text),
      Radio1.Value = "Supplier_Name",   
      StartsWith(Supplier_Name,FilterTextBox.Text),
      Radio1.Value = "Supplier_Number",   
      StartsWith(Supplier_Number,FilterTextBox.Text)
   )
)

 

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

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (6,121)