web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter for Exact match...
Power Apps
Answered

Filter for Exact matches only when a radio button is selected

(0) ShareShare
ReportReport
Posted on by

I have the following filtering based on 3 fields.

The search is automatically doing what I call a wildcard search.

 

If I select a radio button "Radio1" control...say option 1 , I need the filter to do only a Exact Match Search ? on the term in

FilterTextBox   Box 

 

Current Code:

Filter('[dbo].[v_sst_source_select_search]',
    FilterTextBox.Text in Brand
    Or FilterTextBox.Text in Supplier_Name
  Or FilterTextBox.Text in Supplier_Number
)

 

Thanks

David Powell

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,989 Moderator on at
    @Anonymous
    You can replace in with exactin to get the desired result.

    Filter('[dbo].[v_sst_source_select_search]',
    FilterTextBox.Text exactin Brand
    Or FilterTextBox.Text exactin Supplier_Name
    Or FilterTextBox.Text exactin Supplier_Number
    )

    —-
    Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
  • Community Power Platform Member Profile Picture
    on at

    what about the addition of the radio button?

  • mdevaney Profile Picture
    29,989 Moderator on at

    @Anonymous 

    Good point.  I missed that requirement.

     

    Filter('[dbo].[v_sst_source_select_search]',
     RadioButton1.Value = "Brand" And FilterTextBox.Text exactin Brand
     RadioButton2.Value = "Supplier_Name" And Or FilterTextBox.Text exactin Supplier_Name
     RadioButton3.Value = "Supplier_Number" And Or FilterTextBox.Text exactin Supplier_Number
    )

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Community Power Platform Member Profile Picture
    on at

    @mdevaney,

    went with a toggle object....so  ?

    If(Toggle1.Value = false,
    Filter('[dbo].[v_sst_source_select_search]',
        FilterTextBox.Text in Brand
        Or FilterTextBox.Text in Supplier_Name
      Or FilterTextBox.Text in Supplier_Number
    )
    ,Filter('[dbo].[v_sst_source_select_search]',
        FilterTextBox.Text exactin Brand
        Or FilterTextBox.Text exactin Supplier_Name
      Or FilterTextBox.Text exactin Supplier_Number
    )
    )

  • mdevaney Profile Picture
    29,989 Moderator on at

    @Anonymous 

    I see what your goal is now.  I misunderstood before...

    You have the right idea but we should try to avoid using the IF statement because it will give a delegation warning.  Here's my proposal.

     

    Filter('[dbo].[v_sst_source_select_search]',
     (Toggle1.Value = true And FilterTextBox.Text exactin Brand)
     Or (Toggle1.Value = true And Or FilterTextBox.Text exactin Supplier_Name)
     Or (Toggle1.Value = true And Or FilterTextBox.Text exactin Supplier_Number)
     Or (Toggle1.Value = false And FilterTextBox.Text in Brand)
     Or (Toggle1.Value = false And FilterTextBox.Text in Supplier_Name)
     Or (Toggle1.Value = false And FilterTextBox.Text in Supplier_Number)
    )

     

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Community Power Platform Member Profile Picture
    on at

    THE   And Or part of the code is giving it fits.

     

    also...I'm using sql server, so I hope no delegation issues.

     

    DAVID

  • mdevaney Profile Picture
    29,989 Moderator on at

    @Anonymous 

    I don't understand "it gives me fits".  You'll have to show me what you mean.

  • Community Power Platform Member Profile Picture
    on at

    @mdevaney 

     

    sorry, its an error message... 

    but also, I was reading "exactin" documentation.  that is used for Capitalization searches or non-capital searches.

    By Exact I mean,  If i'm looking for  "Columbia Pipe" (regardless of caps or not) it will only find "Columbia Pipe"

    other wise if I search for "Columbia" it will also Find "Columbia pipe"

     

    Thanks

    David

  • mdevaney Profile Picture
    29,989 Moderator on at

    @Anonymous 

    Wow, I did not know that about exactin.  I guess it makes sense.  If we want the exact value we should just use an equals sign instead of exactin.

     

     

    Filter('[dbo].[v_sst_source_select_search]',
     (Toggle1.Value = true And FilterTextBox.Text = Brand)
     Or (Toggle1.Value = true Or FilterTextBox.Text = Supplier_Name)
     Or (Toggle1.Value = true Or FilterTextBox.Text = Supplier_Number)
     Or (Toggle1.Value = false And FilterTextBox.Text in Brand)
     Or (Toggle1.Value = false And FilterTextBox.Text in Supplier_Name)
     Or (Toggle1.Value = false And FilterTextBox.Text in Supplier_Number)
    )

     

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Community Power Platform Member Profile Picture
    on at

    this part it did not like 

     

     Or (Toggle1.Value = true And Or FilterTextBox.Text = Supplier_Name)
        Or (Toggle1.Value = true And Or FilterTextBox.Text = Supplier_Number)

     

     

    so I changed it to:

    Filter('[dbo].[v_sst_source_select_search]',
        (Toggle1.Value = true And FilterTextBox.Text = Brand)
        Or (Toggle1.Value = true And FilterTextBox.Text = Supplier_Name)
        Or (Toggle1.Value = true And FilterTextBox.Text = Supplier_Number)
        Or (Toggle1.Value = false And FilterTextBox.Text in Brand)
        Or (Toggle1.Value = false And FilterTextBox.Text in Supplier_Name)
        Or (Toggle1.Value = false And FilterTextBox.Text in Supplier_Number)
    )

     

    Thanks

    working now !!

     

    David

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard