Add dropdown values programatticaly?

Hi everyone.. I am trying to write method where i can add drop-down values through program. Can anyone help me to do so?
Parents
  • Then try this one:
    // Fill dropdown list in Form with available Starting Page options. Function is called on Form load. 
    
    var inn = new Innovator();
    
    // Get dropdown element from GUI
    var itemTypeDropdownComponent = getFieldComponentByName("Starting_Page");
    
    // Get current start item list values
    var listValues = [];
    var itemTypeDropdownList = [];
    listValues = aras.getListValues("BFDEFE0CEE174B52B8972D49B446B812"); // id of List "StartingPage List"
    for (var i = 0; i < listValues.length; i++) { 
        var value = aras.getItemProperty(listValues[i], "value");
    	var label = aras.getItemProperty(listValues[i], "label");
    	itemTypeDropdownList.push({label: label, value: value});
    }
    itemTypeDropdownComponent.component.setState({
    		list: itemTypeDropdownList,
    		value: ''
    	});
    
    return null;
Reply
  • Then try this one:
    // Fill dropdown list in Form with available Starting Page options. Function is called on Form load. 
    
    var inn = new Innovator();
    
    // Get dropdown element from GUI
    var itemTypeDropdownComponent = getFieldComponentByName("Starting_Page");
    
    // Get current start item list values
    var listValues = [];
    var itemTypeDropdownList = [];
    listValues = aras.getListValues("BFDEFE0CEE174B52B8972D49B446B812"); // id of List "StartingPage List"
    for (var i = 0; i < listValues.length; i++) { 
        var value = aras.getItemProperty(listValues[i], "value");
    	var label = aras.getItemProperty(listValues[i], "label");
    	itemTypeDropdownList.push({label: label, value: value});
    }
    itemTypeDropdownComponent.component.setState({
    		list: itemTypeDropdownList,
    		value: ''
    	});
    
    return null;
Children
No Data