Hello community,
this time I have the following topic:
On the screen below you will see a Form with toggle buttons.
If the toggle buttons have been set to "yes", I would like to count them straight away, in the blue label. Because I want to control the visibility of the save button with it.
Means: if no toggle button was set to "yes", the blue label shows "zero" and if a toggle button is set to "yes", this must then happen as a formula: 0 = 0 + 1 or X=X+1
If the toggle button is set from "yes" to "no", the formula is of course X = X-1 until "ZERO" is reached again at some point.
I hope you understand what I mean.
Now the exciting question is: how do I get that?
Thank you for your help.
Best regards
RoScha
Solved! Go to Solution.
You can easily count True toggles, since it produces a False (0) or True (1) value. PowerApps is able to use both the boolean/integer value, contextually.
Set your Blue label (for counting):
Sum(
Toggle1.Value,
Toggle2.Value,
Toggle3.Value,
Toggle4.Value
)
It may require some fine-tuning since you're using a Form, and the Toggles may produce a non-standard value (depending on their source), but this should work.
You mention this may be simply to control the visibility of a Save button. You don't need the count/label above, unless you want to show that to users. Instead, set the Visible property of your Save button to
Or(
Toggle1.Value,
Toggle2.Value,
Toggle1.Value,
Toggle2.Value
)
This will make it visible, if any Toggle is true.
You can easily count True toggles, since it produces a False (0) or True (1) value. PowerApps is able to use both the boolean/integer value, contextually.
Set your Blue label (for counting):
Sum(
Toggle1.Value,
Toggle2.Value,
Toggle3.Value,
Toggle4.Value
)
It may require some fine-tuning since you're using a Form, and the Toggles may produce a non-standard value (depending on their source), but this should work.
You mention this may be simply to control the visibility of a Save button. You don't need the count/label above, unless you want to show that to users. Instead, set the Visible property of your Save button to
Or(
Toggle1.Value,
Toggle2.Value,
Toggle1.Value,
Toggle2.Value
)
This will make it visible, if any Toggle is true.
Hello @GarethPrisk
I am always amazed at how easy it is to make solutions and how I once again thought too complicated.
Many thanks.
Best regards
RoScha
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
192 | |
67 | |
46 | |
41 | |
22 |
User | Count |
---|---|
252 | |
122 | |
84 | |
80 | |
71 |