Alerts and modals in a script

  • Goal: I want to present the user a confirm dialogue from a script

  • Steps:

  1. Create a button
  2. Create an Event Handler Action: Run Scipt
  3. The script should look something like this
async function do_the_work(){
  
    await firstQuery();
    await secondQuery();
    await thirdQuery(); 
}

if ( confifm("are you sure?")) {
    return do_the_work();
} else {
    console.log( "the user was not sure" );
}

confifm? yes, confifm. it's like confeve but nerdier

1 Like

Have you tried placing your script in a js query?
This would allow you to use the advanced tab to show the confirmation dialog:


Untitled-8.json (7.2 KB)

Hey @code_monk! Thanks for reaching out.

This is a request that I've seen a few times now - here's the most recent thread that comes to mind. I'll add your comments to the internal ticket that we are using to track ongoing interest in such a feature. :+1: In the meantime, the recommendation made by @dcartlidge above is the best alternative.

Let me know if you have any follow up questions!