0

dialog function

Hi there,

 

I use this code but doesn't work:

let check := dialog("Attenzione", "confermi la cancellazione?", ["CONFERMO", "ESCI"]);

if check = "CONFERMO" then delete ('Ordini.Prodotti')

end

 Thx

10replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi Andrea,

    Without a data model, it is difficult. Why do you have the quotation marks on 'Ordini.Prodotti'?
    I would try like this:

    ---

    let check := dialog("Attenzione", "confermi la cancellazione?", ["CONFERMO", "ESCI"]);

    if check = "CONFERMO" then delete Ordini.Prodotti

    end

    ---

    You can first check the deletion with a button and then paste it into the dialog

     

    Leo

    Like
    • Andrea
    • Andrea
    • 4 yrs ago
    • Reported - view

    Ok now works.. thx

    Like
    • Mconneen
    • Mconneen
    • 4 yrs ago
    • Reported - view

    Another hidden gem.. Searching the manual for a "dialog" function yielded no hits.. :(  From the above.. I was able to determine .. 

    let response := dialog("Title", "Question/Display Text", ["Answer 1", "Answer 2"])

    Like
    • blackie
    • blackie
    • 4 yrs ago
    • Reported - view

    Nice. Since the answer choices are an array of strings, a text field in a different table can be used as the input.

     

    i need to play around with dialog().

    Like
    • blackie
    • blackie
    • 4 yrs ago
    • Reported - view

    Screen Shot 2018-10-13 at 4.10.07 PM

    Looks like dialog() is limited to 20 choices. The title or question can be left blank by using "".

    It seems like the width of the dialog box is fixed. If there are a bunch of choices, they will all be on one line, and they can extend past the dialog box window. As you add more choices, the selection buttons get smaller and smaller, and the choice text may not fit.

    Like
    • blackie
    • blackie
    • 4 yrs ago
    • Reported - view

    when I wrote "choices" above, I should have said "answers"

    Like
    • Mconneen
    • Mconneen
    • 3 yrs ago
    • Reported - view

    It appears that a dialog may NOT be called via a Trigger after update. .. If I do a simple alert.. that works.. but if I replace the alert with a dialog.. it never fires..  Is this by design as a dialog blocks? 

    I wanted to use a dialog as opposed to an alert as I use dialogs in my save/close buttons.. so I want to present a common error dialog. :( 

    Like
  • Hi, 

    We have it already in our Change Request list to make the alert and the dialogue function also work in triggers in the browser (as it already does in the App). Thanks for your patience.

    Kind regards, Jörg

    Like
    • Mconneen
    • Mconneen
    • 3 yrs ago
    • Reported - view

    Thanks for the update Jörg!

    Keep up the GREAT WORK! 

    Like
  • Oh good, I was just going to submit a bug request that the dialog doesn't work on trigger, glad it's being fixed soon.

    Like
Like Follow
  • 3 yrs agoLast active
  • 10Replies
  • 5377Views