Hello,
Thank you for your followup on this!
I am glad you got this working.
1. is it possible to make the selection of the value from the combobox required?
To do so, you can select the
"Next" button in the dialog containing the combobox control and set two
"Control Events", as it follows:
Condition: COMBOBOX_1_PROP = ""
Action: Disable
Condition: NOT COMBOBOX_1_PROP = ""
Action: Enable
Where COMBOBOX_1_PROP is the property assigned to your combobox control.
This way, the
"Next" button will be disabled until the user will select a value from the combobox.
2. how to pass multiple selected values from checklist to combobox? I get one value with commas
Here, please note that in order to add multiple values to a combobox, you will need to use the "|" separator, e.g.:
Set Installer Property
Property: AI_COMBOBOX_DATA
Argument: COMBOBOX_1_PROP| Value1| Value2
This is also explained in the
3. Populate ComboBox and ListBox controls article.
By default, a checklist control (the one you are using) will save the values selected by the user at install time in a property, separated by a "," character.
Basically, let's consider a checklist control with the following elements in it:
Text: Element1
Value: Value1
Text: Element2
Value: Value2
If the user select both of these at install time, the property assigned to your checklist control will look as it follows:
Property: CHECKLIST_1_PROP
Value: Element1, Element2
If you populate the combobox using the
CHECKLIST_1_PROP property's value, even though it contains more items, it will be added as a single element to the combobox, as in your screenshot.
Based on the article I have give above, if we want to insert multiple items into the combobox control, we will have to separate the items with the "|" character.
The easiest way to do so would be to set the "|" as the separator for the checklist control (the comma "," is the default separator):
- NewSeparator.png (121.35 KiB) Viewed 7816 times
This way, the items will be added separatly to the combobox control.
However, please note that a drawback exists for this method - that being if the user, for instance, forgets to add an element and has to go back to select it. If this is the case, the combobox will already contain some elements and the populate will fail due to two elements having the same value, e.g.:
If the user selects only Element1, this will be added. Now, if the user goes back and selects Element2 as well, the custom action will try to readd the Element1 element, resulting in an error because that element already exists.
This can be avoided by adding the
"DeleteFromCombobox" custom action as a
"Published Event" for the
"Back" button.
More information about this in the
"Delete items from ComboBox and ListBox controls" article.
Additionally, for your reference, please find attached a sample project in which I have showcased everything said above:
Hope this will help!
Best regards,
Catalin