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 / Slider max value incre...
Power Apps
Unanswered

Slider max value increase decrease based on hide unhide columns

(0) ShareShare
ReportReport
Posted on by 43

Hi,

I am facing the issue of slider control, Slider max value increase or decrease based on hide unhide columns, I have create gallery based on slider control for gallery columns scrollable left right, Max value is 5575, my requirement is if any column hide (etch column width is 175) Max value reduce = 5400, If any column unhide 5400+175=5575,

 

#Hide Unhide columns based on condition check box select...

 

Ref. below screen shot no any column Hide

70000075_0-1660130934937.png

 

Ref. below screen shot last two column Hide

70000075_1-1660131090850.png

 

Categories:
I have the same question (0)
  • Fredrik_A Profile Picture
    3,644 Super User 2026 Season 2 on at

    Use a variable that starts at the correct width and then counts the hide/unhide part, then add/subtract 175 based on the event.

  • BCBuizer Profile Picture
    22,844 Super User 2026 Season 2 on at

    HI @70000075 ,

     

    It seems like you are using a gallery where the user can select which columns to show/hide. If so, you can count the number of checked items in that, multiply by 175 and add to a base value:

     

    Slider.MaxValue = 2000 + (CountIf(Gallery.AllItems, CheckBox.Value) * 175)

     

    In the above example I have set the base value to 2000, but you can change that to whatever suits you best.

     

    Of course you can turn this around and deduct the number of unchecked items, multiplied by 175, from 5575 as well:

     

    Slider.MaxValue = 5575 - (CountIf(Gallery.AllItems, !CheckBox.Value) * 175)

     

    However,  if you ever want to add new columns to your app, the first option will adapt to that without intervention, whereas you'll have to change the maximum value for the second option.

  • 70000075 Profile Picture
    43 on at

    Sorry I don't understand, where to use this formula, in the slider Max function or checkbox, please provide the brief details... 

     

    Thank you so much... 

  • BCBuizer Profile Picture
    22,844 Super User 2026 Season 2 on at

    Hi @70000075 ,

     

    This is to be used for the MaxValue property of the slider.

     

    You probably have to make some changes to the code:

    - Do not include "Slider.MaxValue =" this was to indicate which property to use

    - "2000" needs to be replaced with a base value that makes sense. Since I don't know how many columns you have, I had to guess on this.

    - "Gallery" should be replaced with the name of the gallery where you selected to show/hide columns

    - "CheckBox" should be replace with the name of the checkbox in abovementioned gallery.

  • 70000075 Profile Picture
    43 on at

    Not working,

    70000075_0-1660302783906.png

    In the manual create gallery there are more than 30 columns and each columns has a separate check box to Hide and Unhide columns, all those checkbox names are different, if I hide some columns there is space on the right side of the application, which is MaxValue fixed value in the slider.

    70000075_1-1660302871949.png

     

  • BCBuizer Profile Picture
    22,844 Super User 2026 Season 2 on at

    Hi @70000075 ,

     

    What is the name of the checkbox control in you gallery? You seem to have not changed that name yet in the formula:

    BCBuizer_0-1660308122352.png

     

     

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 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard