Toggle Buttons resetting after clicking off popup or refreshing page

Hello everyone! Today I’m running into a little bit of an issue and I was wondering if there is a way I could fix it. Currently I have toggle buttons setup and when you click on it, it changes the text and makes the other text invisible. But when you refresh the page it resets the toggle buttons and resets the text so you don’t know if the department is either closed or open. Any help would be greatly appreciated.

State is not something that you can keep on page refresh. You need to store the information in DB

I have this setup already https://gyazo.com/f6fdb858a5975d6c9bee650e6ac4d5ab

it will open the department but it doesn’t show if the department is open on the dept status tab and it resets the buttons to the off position.

And how are your conditionnal and workflow?

This is what I have setup in the workflow. When you toggle the department it opens the application option in a dropdown.

@brennanlgaming
This is over complicated.
OpenOrClosed should just be = IonicToggle is checked

it still keeps resetting on page refresh though. I’m trying to see if there is a way where when you refresh the page it reads off of the data and sees the department is open so keep the toggle button enabled.

Hi @brennanlgaming,

  1. I am guessing that you want to make several Departments either turned on or off for certain users. Therefore, I would like to advise you to create new fields for each department in your user table (that are yes/no based).

  1. In order to keep the toggle in the last modified state (checked/not checked) consider to add the following condition to your toggle element:

This fixes your issue with toggles resetting on page refresh.

Best,
Julius

1 Like

I appreciate the support! I’m currently trying to keep the toggle switch on if the department is open and have it show up in the dropdown menu and if it is closed then show the toggle switch off and it not show in the dropdown menu.

@brennanlgaming
Showing the result is a good thing. But what we need to see, is also the setting in backend!
What I believe is that dropdown should be set on dynamic list, using a Do search For department with constraint OpenOrClosed = Yes 's Departement

this is what I have for the drop down. What is supposed to happen is when you toggle the button to on for the department you chose it’s supposed to show up on the drop down menu so people can select it and it’s also supposed to change on the dashboard as status open so the department head/admins can see if that department is accepting applications

https://gyazo.com/8715e5df7223d9ebc9c35be92de95067

And in Search setting, what do you have?

https://gyazo.com/8a285887d5fc37ce612f9702ce6462c8

Sorry. I misunderstood. Your dropdown is correct. If you check your DB, the open (yes) are the one shown in your dropdown
Your issue seem more linked to checkbox
Can you provide setting of your checkbox?

Change the Preset Status to dynamic
You will be able to set a dynamic value from DB.

But I was talking about the other page with ionic toggle

Yea my bad lol, I already have the ionic toggle on dynamic

Can you show Search setting?

What I believe is that you should do that
Create a Repeating Group. Set Data to Departmeent, and Do a dynamic Search for Departement (get all, no constraint and nothing else)
In RG Cell, Add a text field: Current cell’s departement and Add a Ionic Toggle
Set it to Dynamic
Current Cell’s YesorNo

So in future, if you need to add more department, change their name or anything like this, you will not need to go in page and edit the search or name.