Skip to main content

Notifications

Community site session details

Community site session details

Session Id : sNf42mg8q4n1ZoLltgXbCY
Power Apps - Building Power Apps
Answered

Slider Value Based on Field Content

Like (0) ShareShare
ReportReport
Posted on 30 Jul 2023 14:28:37 by 4,833 Super User 2025 Season 1

I have a Gallery in which are a Label and a Slider control.

The Label is static. The slider value is determined when other
fields in the app (other columns in the SP List) have data.

I am currently using the following formula to adjust the slider value.
     If(!IsBlank(Text1.Text) && !IsBlank(Text2.Text) && (Text3.Text)="Yes",44,

     !IsBlank(Text1.Text) && !IsBlank(Text2.Text),22,0))

Phineas_1-1690727191243.png

                  0                                    20                                  40                               60                               80                        100
My current version persumes the fields used in the formula are populated
in a linear order, thus moving the slider value along its line. However, I don't
know for sure if this is true, the fields might be completed in any order,
causing my slider formula not to work properly.

My question, can the formula be restructred to simply add a predetermined
amount to the slider value whenever any of the fields have content added?
I've seen this down with a Slider control using 'Up' and 'Down' arrow icons.

This will allow the user to add content to the five fields in any order they like
and the slider will progress as desired.

Example: If(!IsBlank(Text1.Text),Slider.Value,+20,
               If(!IsBlank(Text2.Text),Slider.Value,+20, 
               If(!IsBlank(Text3.Text),Slider.Value,+20,
               If(!IsBlank(Text4.Text),Slider.Value,+20, 
               If(!IsBlank(Text4.Text),Slider.Value,+20)     

Phineas_0-1690726282681.png

                  0                                   20                                    40                              60                               80                        100

Categories:
  • Verified answer
    LaurensM Profile Picture
    12,510 Super User 2025 Season 1 on 30 Jul 2023 at 16:26:43
    Re: Slider Value Based on Field Content

    Hi @Phineas,

     

    Using separated If() statements should solve your problem regarding the controls not being completed in a linear manner.

    If(!IsBlank(Text1.Text), 20) + If(!IsBlank(Text2.Text), 20)

     

    In case of a lot of controls, you could create an array of control values and loop through those:

    Sum(
     ForAll(
     [
     Text1.Text,
     Text2.Text,
     Text3.Text
     ],
     If(
     !IsBlank(ThisRecord.Value),
     20
     )
     ),
     Value
    )

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 146

#3
stampcoin Profile Picture

stampcoin 130

Overall leaderboard
Loading complete