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

10 replies

null
    • Leonid_Semik
    • 6 yrs ago
    • Reported - view

    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

    • Andrea
    • 6 yrs ago
    • Reported - view

    Ok now works.. thx

    • Mconneen
    • 6 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"])

    • blackie
    • 6 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().

    • blackie
    • 6 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.

    • blackie
    • 6 yrs ago
    • Reported - view

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

    • Mconneen
    • 5 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. :( 

    • Jorg
    • 5 yrs ago
    • Reported - view

    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

    • Mconneen
    • 5 yrs ago
    • Reported - view

    Thanks for the update Jörg!

    Keep up the GREAT WORK! 

    • activelifejss
    • 5 yrs ago
    • Reported - view

    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.

Content aside

  • 5 yrs agoLast active
  • 10Replies
  • 5560Views