I am using the prompter function and for a popup list is it possible for one to be the default?
On running the script, the default is “Unspecified”
For example in the following code for passport_type_list variable, I would like the first entry (‘United Kingdom of Great Britain and Northern Ireland passport’) to be automatically shown rather than ‘Unspecified’.
var heshe;
var heshe_list = ['his', 'her'];
var director_signee;
var passport_type;
var passport_type_list = ['United Kingdom of Great Britain and Northern Ireland passport', 'Irish passport', 'United States of America passport'];
let prompter = Prompter.new();
prompter.cancelButtonTitle = 'Cancel';
prompter.continueButtonTitle = 'Continue';
prompter.addParameter('Passport type: ', 'passport_type', 'popup', passport_type_list)
prompter.addParameter('He or she: ', 'heshe', 'popup', heshe_list)
prompter.addParameter('Name of the director signing: ', 'director_signee')
.show('Choose whether there is a he or she\n\n\nIf a company then put in name of director signing',output);
-
This topic was modified 2 years, 6 months ago by Brendan.
Hi Victor,
There’s nothing like that now, but in the future I may do something like this where you can specify an additional parameter that’s used as a default value:
.addParameter('Label 2', 'value_2', 'popup', ['Option 1', 'Option 2'], 'Option 2')
It’s not there at the moment, so don’t try it now. It won’t work.
Brendan,
Thank you for the response and I do hope you can add this new option.