Promote Dropdown dinamically
- 3 years ago
Well, the way to work with dropdowns changed around 3 times over the years. There is a difference between 11SP9, 11SP11 and 11SP15 :).
General tip: Always add a comment sections on the top of your code that indicates which version it was build for and add some descriptions.
This way I found this Innovator 11SP9 code that filled a dropdown in Form based on a List item:
var inn = new Innovator();
// Get dropdown element from Form
var div_startpage = getFieldByName("mydropdown").id;
var control_items = div_startpage.substring(0, div_startpage.indexOf("span"));
var select = document.getElementById(control_items);// Get list values
var listValues = [];
listValues = aras.getListValues("BFDEFE0CEE174B...."); // id of List "xy"
for (var i = 0; i < listValues.length; i++) {
var value = aras.getItemProperty(listValues, "value");
var label = aras.getItemProperty(listValues, "label");
var option = document.createElement('option');
select.options = new Option(label, value); // fill dropdown list
}No Idea if it works :D