Toggle switch reset

Good day,

Thank you to @Rozza & @Victor for the assistance on the forum so far.

I have a new query where I am trying to reset the toggle switches on a screen back to ‘off’ once I have returned back from a screen.

I have set a separate ‘True/false’ property under the ‘Users’ collection for each switch.

I have then set an action for the switch to update the property to ‘true’ when in the on position and to ‘false’ when in the off position.

I have placed a separate ‘Update’ button that updates the ‘True/false’ properties for all switches before proceeding to the next page.

However the switches still remain in the same position as when I left the screen.

Not sure I’m missing something in my logic &/0r Database.

When switch is in the on position:

When switch is in the ‘off’ position:


Update button:

PS: I have attempted to work at it after reading a few similar queries on the forum, but without luck.

Thanks again.

Kausie

PPS: I have also set the back button on the next page to reset the switches to ‘false’ / off when returning back. But also without success.

Hello, the (True/False) property should be connected to the (Switch component), also please make sure that the action in the switch is just changing the the property between “True or Flase” and not make it connected to other properties. This way you’ll notice the result of the switch everytime you click on it.

Thank you!

Hi all,

Thanks Ali-Bazzi for the input.

I have already set an action for each switch to update the ‘true/false’ property depending on whether in the ‘on’ or ‘off’ Position, if I understand you correctly.

I have made a short video of the issue here:

Thank you in advance again,

Kausie

Hey @Mitrakj

Because these toggles are tied to the logged in user, they reflect the value stored under that user’s record.

You need to reset these values by updating the user record at some point in your flow. Perhaps on the ‘start’ button.

Hi @Rozza,

I have set an action on the ‘START’ button on the welcome screen to update all the switches to ‘false’ / off under the logged in users collection. But no luck.

Here is a link to a clone:

Thanks as always,

Kausie

Hello and thanks for the coffee you shouted me :+1:

You have two user update actions, when actually you can do it both in one. You may need a conditional on that as you don’t want to do it for a new user.

Strangely I think the custom formula has stopped working, you can see from the browser inspector that it is submitting @gmail, without any random numbers before.

Get comfy looking at the actions as they are fired in the inspector, you can debug a lot from there :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.