I am trying to build a gallery with toggles and a submit button, where I want to save my data on share point only if all the toggles are answered "yes" ... how do I apply this "if" to all my toggles and not just the first one?
Solved! Go to Solution.
Hello @pagliaci,
This formula will return 0 when all of the toggles are "On":
CountRows(Filter(Gallery1.AllItems,Not(Toggle1.Value)))
You could set the DisplayMode property in the Submit Button to something like this:
If(
CountRows(
Filter(
Gallery1.AllItems,
Not(Toggle1.Value)
)
) > 0,
DisplayMode.Disabled,
DisplayMode.Edit
)
This will disable the button unless all toggles are turned on.
Example:
Hope that helps.
Please if this solves your problem.
-Ron
Hello @pagliaci,
This formula will return 0 when all of the toggles are "On":
CountRows(Filter(Gallery1.AllItems,Not(Toggle1.Value)))
You could set the DisplayMode property in the Submit Button to something like this:
If(
CountRows(
Filter(
Gallery1.AllItems,
Not(Toggle1.Value)
)
) > 0,
DisplayMode.Disabled,
DisplayMode.Edit
)
This will disable the button unless all toggles are turned on.
Example:
Hope that helps.
Please if this solves your problem.
-Ron
Thank you so much!!
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.