Hi, I have a Modal that I’d like to show when a variable is empty.
I also need it to open when triggered manually so I have a variable set for that.
The behaviour I’m seeing is that in my app, if I log in, then exit and come back later, I’m still authenticated but the data needs to be fetched again. The app won’t know what data needs to be fetched unless the user selects it, because they can have multiple versions of the data in their account. This happens in a modal.
So I need the modal to show when that data is blank, and also when the data is there but the modal is manually triggered to open (this would happen when the user wants to switch their data to another version)
This is what I’m currently doing but without success.Any help would be greatly appreciated.
Without checking in editor, I think this should work.
Its possible the currentLinchpin variable’s default value is an empty object/value such as {} so it might not recognize it as ‘false’. If you set it to completely empty, then it might behave as you expect.
If not, then maybe doings keys(currentLinchpin).length might help, but its a bit of a hack
A variable is set as an object. When that object is empty, I want to set the condition not to display the element. My attempt was something like this but as it was mentioned in the thread, there may be an issue since it’s looking for a true or false.
Took me a bit to figure out the formulas but it works!
I have two elements; one should display when variable object is empty, the other should display when the variable object is not empty. The way I got it to work is with a double-negative. Each of these is set on a different element but checks the same variable.