Dynamic ask question buttons - anyone tried?

Was thinking about the possibility to create dynamic ask question buttons using script,
Anyone tried?
Anyone know if calling a script in the ask question button field would work?

As part of my Payment Processor Tutorial, I use the following…

var cctype = dlg.AskQuestion("Choose Credit Card type","Amex=AMEX,Master Card=MAST,Visa=VISA,Discover=DISC,Other=OTHR,CANCEL=CANCEL");

I have not tried {CALL:X} in the Action within a Rule, but the only way to know if it works is to try it out… It probably works just fine.

1 Like

How are you using that script?
You have a flow within script?
dlg.AskQuestion? Is that a way to call an ask question within a script? Like a [?prompt]?

Yes, there a a few dlg.X() helpers available that you can use in JS. I know of 2 off the top of my head:


Not clear on all the parameters, or if there are more of them.

This shows use of both of them…

1 Like

They are used in configuration tasks as well.

I imagine dlg is meant to stand for dialog? as these are both ‘pop up’ type actions.
Do we have other script expressions listed anywhere relating to other actions?

It works!

1 Like

I see;
dlg.EditValue("Last 4 CC Digits;.{4};;ON","")
Also in your payment info topic. presume this is like [?prompt]

Do we have execute automation command from script?