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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using slider to filter...
Power Apps
Answered

Using slider to filter gallery with wildcard

(0) ShareShare
ReportReport
Posted on by 421

Hi everyone.

 

Trying to filter a gallery using a slider.  I have 2 of the 3 slider positions working.  I am trying to get the position 0 to show everything.  Here is the code.  Any help would be appreciated!  I have tried to use the asterisk as the wildcard but no dice.

ckserra33_0-1661272699319.png

 

Here is my full code for the gallery as well if thats needed.

 

Thanks!

 

Chris

 

Filter(
DropColumns(
SortByColumns(
AddColumns(
Search(
Filter(
AmusementAssets,
(Dropdown8.Selected.Name = "All") || 'Status (cr3db_status)' = Dropdown8.Selected.Name,
(ComboBox1.Selected.Result = "All" || 'Current Store Name' = ComboBox1.Selected.Result)

),
tiGameName.Text,
"cr3db_name"
),
"_calced",
Value(NBV)
),
"_calced",
If(
varNBVSort,
Descending,
Ascending
)
),
"_calced"
),SetForRetirement = If(Slider4.Value = 1,"Yes",If(Slider4.Value = 2, "No",If(Slider4.Value = 0, "*" ))))

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ckserra33 

    Hi Chris!

    Please consider changing your Formula to the following:

    Filter(
     DropColumns(
     SortByColumns(
     AddColumns(
     Search(
     Filter(AmusementAssets,
     (Dropdown8.Selected.Name = "All") || 'Status (cr3db_status)' = Dropdown8.Selected.Name,
     (ComboBox1.Selected.Result = "All" || 'Current Store Name' = ComboBox1.Selected.Result)
     ),
     tiGameName.Text, "cr3db_name"
     ),
     "_calced", Value(NBV)
     ),
     "_calced",
     If(varNBVSort, Descending, Ascending)
     ),
     "_calced"
     ),
     SetForRetirement = Switch(Slider4.Value, 
     1, "Yes", 
     2, "No",
     0, "*" 
     )
    )

     

    Now, this is assuming the SetForRetirement has a * in it. 

    Is that what you are referring to?  Or is it that you want all SetForRetirement items to return if it is 0?

     

    If so, then change the formula to:

    Filter(
     DropColumns(
     SortByColumns(
     AddColumns(
     Search(
     Filter(AmusementAssets,
     (Dropdown8.Selected.Name = "All") || 'Status (cr3db_status)' = Dropdown8.Selected.Name,
     (ComboBox1.Selected.Result = "All" || 'Current Store Name' = ComboBox1.Selected.Result)
     ),
     tiGameName.Text, "cr3db_name"
     ),
     "_calced", Value(NBV)
     ),
     "_calced",
     If(varNBVSort, Descending, Ascending)
     ),
     "_calced"
     ),
     Slider4.Value = 0 ||
     SetForRetirement = Switch(Slider4.Value, 
     1, "Yes", 
     2, "No"
     )
    )

     

    I hope this is helpful for you.

  • ckserra33 Profile Picture
    421 on at

    @RandyHayes  That works perfectly!!  The only text in the column is "Yes" and "No", I was unsuccessfully trying to use the * as a Wildcard, and show all rows where there was text in that column.  Your method is much cleaner!  What is the best way to add another slider with the same elements to it?  I have an Archived column that contains Yes and No as well, do I add an additional Filter on the front of the entire formula?

     

    Thanks again, enjoy your coffees!

     

    Chris

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ckserra33 

    Thanks for the coffee!! (as I take a sip of it right now!)

     

    You can incorporate the archived into the same formula in the same place.

    Ex:

    Filter(
     DropColumns(
     SortByColumns(
     AddColumns(
     Search(
     Filter(AmusementAssets,
     (Dropdown8.Selected.Name = "All") || 'Status (cr3db_status)' = Dropdown8.Selected.Name,
     (ComboBox1.Selected.Result = "All" || 'Current Store Name' = ComboBox1.Selected.Result)
     ),
     tiGameName.Text, "cr3db_name"
     ),
     "_calced", Value(NBV)
     ),
     "_calced",
     If(varNBVSort, Descending, Ascending)
     ),
     "_calced"
     ),
     Slider4.Value = 0 ||
     SetForRetirement = Switch(Slider4.Value, 
     1, "Yes", 
     2, "No"
     ),
     SliderX.Value = 0 ||
     Archived = Switch(SliderX.Value, 1, "Yes", 2, "No")
    )

    In the above sliderX is the new slider.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @ckserra33

    In the OnVisible of the screen: Set(varslider,"All")

    In the Slider properties:

     

    Min: 0, 
    Max: 2, 
    Default:0 
    OnChange: If(
     Slider1.Value = 1, Set(varslider,"Yes"),
     Slider1.Value = 2, Set(varslider,"No"),
     Slider1.Value = 0, Set(varslider,"All") // accounts for user changing selection 
     ) // from 0 to another value then back again
     

     

     

    Tidying up the gallery Items property:

     

     

    With({aa:Filter(AmusementAssets,
     Or(Dropdown8.Selected.Name = "All",
     'Status (cr3db_status)' = Dropdown8.Selected.Name
     ) &&
     Or(ComboBox1.Selected.Result = "All", 
     'Current Store Name' = ComboBox1.Selected.Result
     ) &&
     Or(varslider = "All", SetForRetirement=varslider
     ) 
     )},
     Filter(
     SortByColumns(
     AddColumns(
     Search(aa, tiGameName.Text, "cr3db_name"
     ), "_calced", Value(NBV)
     ), "_calced", If(varNBVSort,Descending,Ascending)
     )
     )
    )
    

     

     

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 400 Most Valuable Professional

#2
11manish Profile Picture

11manish 141 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard