Variables problem

Hello! I hope that someone can help me

I created a design for a folder with a variable called “folder_open”, and when i click on the folder, there is a workflow that change this variable to true, and when the condição its true, the folder open… but the problem its when there is more than one folder, because when i click a specific folder, because all they uses the same variable, consequently all folders open

someone can help please? i didnt find any thing about this
i need that when i click on a folder, just that folder open

Hi, you need to create an object, like toggleStates in order track key-value pairs for each folder:

{
“foder1”: false,
“folder2”: false
"folder3: false,

}

You bind these booleans to each folder. Then, on your click workflow, you partially update the object only with the key (path) and boolean (value) you want:

Thanks for the help, but in my case, the folders will be created by the user, and each user can have your own folders, and the folders count doesn´t have limit. so doing like:

"{
“foder1”: false,
“folder2”: false
“folder3: false,

}”

will work normal? how can i do it
dynamically?

You can add folders to the object. It will work the same way… When adding, you need to pass the key and the value. Use partial update.

1 Like

Thanks for help me danlopes, it works!