Currently we use @Picklist to present a list to the user, he then selects one or more items and presses ok, this information is then transferred to the main document.
We would like to add the following functionality:
The user can select the same item more than once without closing the dialog. He can then press another button to transfer the info. to the main doc, or a way to specify the quantitiy for each selected item.
voltxt:=@Prompt([OKCANCELEDITCOMBO]; “How many?”; "Enter the quantity of: " + item;“1”;volChoices);
vol:=@ToNumber(voltxt);
…set the field values with the values of item and vol.
Does that work? I know I have limited you to a max of 10, but you could just ask for a volume, then convert it to a number, and make sure that that does not provide an error.
Use the method notesUIWorkspace.DialogBox and have a dialogbox field in the form which you open thru this method. Then you can have the functionality of passing the selected ones to transfer to the main document when button is pressed.
@Picklist doesn’t work this way. You would need to use a dialog form and create a method on that form to tabulate the data (perhaps a listbox field with your choices in it, which when clicked on populate a computed field by appending the newly selected value to what is already there. Or, you could simply have a listbox and a numeric field for the amount to append, and pass those values back to the main document (the item name and the amount to add. It could be stored in a mv field (when selected) likeitem 1, 3;
item 2, 1;
item 3, 123432;
where the semicolon is used to separate multiple values. When the data is passed back to the main field, it can be parsed based on the comma to determine how many of each item have been added. The field on the main form can then be updated.