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))
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)
0 20 40 60 80 100
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!
WarrenBelz
146,751
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional