New Dialog open when variable is true

Hello,
Im planning on having the dialog be in a component and then triggering the opening of the dialog from a global workflow. this means I don’t have access to the components workflow for opening the dialog and so I was hoping there would be a way to use a variable to trigger it being opened. Any other methods are also welcome

Add a component property in your component, and bind it to your variable.

Create a component workflow, triggered by property change, that opens/closes dialog based on property value

2 Likes

perfect that’ll work!

Would you prefer having an option to manually bind the open state of the dialog?

Yeah! That would be a nice feature I think

Related question here: I added the new dialog to a page. it opens if I use the trigger, but I want to be able to open the dialog via a variable. when I set the conditional display on the dialog element (through either conditional display method) - the dialog will not appear when the variable is true. Why is the dialog not showing? is this a bug with the new dialog element???

Instead of setting the variable, why not use the component action and toggle the dialog directly? Works perfectly for me.

thanks eric. But how do I “use the component action and toggle the dialog directly”? I want an icon to trigger this, but when I add a workflow step I can’t find any action listed that would trigger a component action…

UPDATE: I just found the option to execute a component action. Thanks for your help.

1 Like

Glad you found it. I’m guessing you are like me, not a heavy user of custom components, as it took me a bit to figure it out to.

Another tip, if you copy a dialog from one page to another, you will also likely copy the workflow that triggers the dialog to an element (button) on the new page. You will need to edit the ‘execute component action’ to associate it to the copied dialog.

Overall, I think the new dialog is better than the old modal. Unfortunately I have a ton of modals, so I’m slowly migrating them over.