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

Radio button and Search Text in Gallery.

Hi,

I want to use the Radio button to Filter the data in the table: "myTable" column "Type" and want to Search Code or Fname or CizID in txtSearch.Text

I try to use the code below but It's not working. Please help.

Thank you for any suggestion.

 

Filter(myTable,txtSearch.Text in Code,
            txtSearch.Text in FName,
            txtSearch.Text in CizID),
If(
    Radio1.Selected.Value = "Housing",
    Filter(
        myTable,
        Type = Radio1.Selected.Value
    ),
    Radio1.Selected.Value = "Direct Sales",
    Filter(
        myTable,
        Type = Radio1.Selected.Value
    ),
    Radio1.Selected.Value = "Tele Sales",
    Filter(
        myTable,
        Type = Radio1.Selected.Value
    )        
)
      

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @infinitepp ,

You seem to have two tables in there (myTable and tbl_mas_saleagents). Assuming they are the same table, you could do something like this

With(
   {
      wText:txtSearch.Text,
	  wRadio: Radio1.Selected.Value
   },      
   Filter(
      myTable,
      (wText in Code || wText in FName || wText in CizID) &&  
      If(
         wRadio = "Housing" || wRadio = "Direct Sales" || wRadio = "Tele Sales",
         SubChannelCode = wRadio
      )
   )	  
)

 

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
WarrenBelz
Super User
Super User

Hi @infinitepp ,

You seem to have two tables in there (myTable and tbl_mas_saleagents). Assuming they are the same table, you could do something like this

With(
   {
      wText:txtSearch.Text,
	  wRadio: Radio1.Selected.Value
   },      
   Filter(
      myTable,
      (wText in Code || wText in FName || wText in CizID) &&  
      If(
         wRadio = "Housing" || wRadio = "Direct Sales" || wRadio = "Tele Sales",
         SubChannelCode = wRadio
      )
   )	  
)

 

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.

 

v-jefferni
Community Support
Community Support

Hi @infinitepp ,

 

Could you please share more details about your data source? What is your data source table? Which type is the SubChannelCode column?

 

Assuming SubChannelCode is a Text type column, then please try:

Filter(
       Filter(
        tbl_mas_saleagents,
        SubChannelCode = Radio1.Selected.Value
       )  
       txtSearch.Text in Code,
       txtSearch.Text in FName,
       txtSearch.Text in CizID
)

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Sorry for my mistake. I forget to change the table name and column. 

 

I forget to change the table name and column. Sorry for my mistake 😣

I tried to use your code but Searching in the textbox is not working.

Thank you so much for your solution. 

It's work right now!

Helpful resources

Announcements
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.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,403)