<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Add dropdown values programatticaly?</title><link>https://www.aras.com/community/f/development/3791/add-dropdown-values-programatticaly</link><description>Hi everyone..

I am trying to write method where i can add drop-down values through program.

Can anyone help me to do so?</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Add dropdown values programatticaly?</title><link>https://www.aras.com/community/thread/1542?ContentTypeID=1</link><pubDate>Mon, 07 May 2018 07:57:47 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:62f79791-9f69-44e5-a8ee-e760912f0ee0</guid><dc:creator>Kara</dc:creator><description>Hi Angela,

I tried above code and it is working fine.

Thanks for your help.

&amp;nbsp;

Can i write it for server method?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add dropdown values programatticaly?</title><link>https://www.aras.com/community/thread/1541?ContentTypeID=1</link><pubDate>Mon, 07 May 2018 03:10:57 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:76a6400f-cfea-4eb8-a359-9f8b0b90c6f8</guid><dc:creator>AngelaIp</dc:creator><description>Then try this one:

&lt;pre&gt;&lt;code&gt;// 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(&amp;quot;Starting_Page&amp;quot;);

// Get current start item list values
var listValues = [];
var itemTypeDropdownList = [];
listValues = aras.getListValues(&amp;quot;BFDEFE0CEE174B52B8972D49B446B812&amp;quot;); // id of List &amp;quot;StartingPage List&amp;quot;
for (var i = 0; i &amp;lt; listValues.length; i++) { 
    var value = aras.getItemProperty(listValues[i], &amp;quot;value&amp;quot;);
	var label = aras.getItemProperty(listValues[i], &amp;quot;label&amp;quot;);
	itemTypeDropdownList.push({label: label, value: value});
}
itemTypeDropdownComponent.component.setState({
		list: itemTypeDropdownList,
		value: &amp;#039;&amp;#039;
	});

return null;&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add dropdown values programatticaly?</title><link>https://www.aras.com/community/thread/1540?ContentTypeID=1</link><pubDate>Mon, 07 May 2018 02:54:39 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:c2aa40c9-8ca5-488e-81d0-fcdf2aae3085</guid><dc:creator>Kara</dc:creator><description>Thanks Angela...

But i am using Aras 11 sp 12 version.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add dropdown values programatticaly?</title><link>https://www.aras.com/community/thread/1537?ContentTypeID=1</link><pubDate>Mon, 07 May 2018 02:44:46 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:42a7fdc6-ec9b-4a40-81f2-7df8e0305e85</guid><dc:creator>AngelaIp</dc:creator><description>Hi Mily,

what version of Aras do you use? For SP9 e.g. you can take a look at my starting page project:
&lt;a href="https://github.com/AngelaIp/cui-select-starting-page"&gt;github.com/.../cui-select-starting-page&lt;/a&gt;

Code for filling dropdown list: 
&lt;a href="https://github.com/AngelaIp/cui-select-starting-page/blob/master/Import/SelectStartingPage/Import/Method/BPL_SelectStartingPage_onLoad.xml"&gt;github.com/.../BPL_SelectStartingPage_onLoad.xml&lt;/a&gt;

In my case I take the dropdown labels from a predefined &amp;#39;List&amp;#39;, but you can also fill the dropdown manually.
This project will not work under SP11/SP12, as the new type-ahead function requires a different approach. I already have a SP11 compatible version of this project, but it is not online yet.

Angela&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>