Hi,
Currently I am using the ‘user input’ box available in KM listing out names, allowing the user to select the name as a check box. I am now trying to replace this ‘user input’ box with a Applescript, one of the reasons is because the user input box does not have a scroll screen so i can fit all the names (50 names) onto the user input box as the list is then bigger than the screen so the user would not be able to see all the names on the user input box. The user would then select the names, the names selected are Variables and have the assigned the value of ‘1’ to them and the unselected names would have a variable value of ‘0’ assigned to them in KM
Instead I intend to use the following (example, mine would have a selection of 50 different names…) in Applescript;
choose from list {"Peter", "Mark", "John", "Jill", "Joe"} with title "Select Numbers" default items "1" with multiple selections allowed
This option brings up 5 names
Which code would I have to use in this example for the names selected by the user above to have the value 1 assigned to them in KM and the unselected names to have the values 0 assigned to them in KM. We can assume that the selection names above are also the same Variable names used in KM
e.g. in the above example the user only selects Peter, therefore in KM all the names except Peter as above would have a variable value of ‘0’ and Peter would have a KM variable value of ‘1’. If user then (repeated) selected three names such as “John”, “Jill”, “Joe” then these names would have a KM variable of ‘1’ each and the remaining two names which were not selected would now have a KM variable value of ‘0’
I hope that I have not confused, a simple script setting out how to deal with one name would be really helpful.
Thank you