Hello,
I’m trying to change a look or a component based on the action from another page.
I managed to utilize Get URL parameters, and things are working fine. But, when the page reloads, the component change resets.
Is there are way to keep the component stay in it’s last modified state, no matter if the page reloads?
Here is the diagram of what I’m trying to achieve. When I go to a different page and click Save and come back to Main Page, the previously changed element is not keeping its “Checkmark” status.
These are a list of tasks. When a task is completed in a new page, user comes back to the main page and that component is checked.
I don’t want this be linear - user can complete the tasks in any order they choose.
Thank you,
Are you saving the 'Checkmark Status ’ in the DB?
No I’m not. I have an icon, and changing it to be a checkmark icon on Get Save from page URL is Yes.
It’s working, but when I come back from the 2nd task, that icon reverts back to original one.
Well if you’re not saving it somewhere, then of course it won’t remember its value.
You’ll need to save the fact that it’s been checked somewhere - logically in the app database (but depending on the use case it could be in local storage or even just in the URL).
Thank you. I think it’s slowly getting clear, but still is a bit muddy.
What would I save in database? I’m trying to change two elements on a button click on a different page - would I save a Yes/No state of the button?
Here’s what’s currently happening
Well I don’t know anything about your app or your database structure…
But logically, whatever it is that’s being checked off (e.g. perhaps it’s a ‘task’) must have some representation in the Database (or an Option Set) - and then there must be a Record that connects that task to a User, which is what you would need to update (or create) in the DB.
e.g. for a simple Task management function, you’d have a Datatype of ‘Task’, and a datatype of ‘userTask’ linking a User to a Task and containing other data such as whether or not it been checked off, and on what date etc.
So that’s what you’d update to store the checked/unchecked status of the task.
1 Like
Yess, it worked, thank you!
A follow up - how would one go about showing/hiding a button only when all three Data types are “Checked”?
Just add a condition to the button based on the relevant DB values.
I have 3 database values. When I’m trying to add all three - the button stays visible, because I think the button shows even if one of those DB values are “Checked”. I’m trying to show the button only when all three DB values are checked, not 1 or 2.
I tried creating an Option Set, and added all three DB “Checked” values. But can’t figure out how to use that as a Condition.
Then the condition should be:
when: DB1 value is yes AND DB 2 value is yes AND DB 3 value is yes.
1 Like
Ah, thank you!
I tried exactly that, but for some reason the button is still visible even if DB1 value is Yes and the other DB values are still No. Could be a bug.
Thanks for your help, will need to buy you coffee sometime.