<?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>Promote Dropdown dinamically</title><link>https://www.aras.com/community/f/development/37854/promote-dropdown-dinamically</link><description>Hello, I&amp;#39;m trying to fill a dropdown by code. Let me explain, I have a report, which when selected, shows me a screen where the user can select the date range and I would like to put a dropdown with the list of departments of a method (table). Well, there</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Promote Dropdown dinamically</title><link>https://www.aras.com/community/thread/9278?ContentTypeID=1</link><pubDate>Fri, 03 Mar 2023 12:57:40 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:7a706da1-cda5-432d-aae5-20764cb8abcf</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;Glad to hear it worked! You never&amp;nbsp;have to justify if it needs&amp;nbsp;a bit more time to answer. Especially when you have good reasons :D. Happy &amp;quot;&lt;span&gt;Dia de Andalucia&amp;quot; from the &amp;quot;Free State of Bavaria&amp;quot; !&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;There is another source of code you may haven&amp;acute;t found yet: Github! --&amp;gt;&amp;nbsp;&lt;a href="https://github.com/ArasLabs"&gt;https://github.com/ArasLabs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In your case you probably often have to look at previous releases of the projects, cause you&amp;acute;re still using I11.&lt;br /&gt;But lot&amp;acute;s of the projects are based on&amp;nbsp;I11.&lt;/p&gt;
&lt;p&gt;I actually used a dropdown in one own projects -&amp;gt;&amp;nbsp;&lt;a href="https://github.com/AngelaIp/cui-select-starting-page"&gt;https://github.com/AngelaIp/cui-select-starting-page&lt;/a&gt;&amp;nbsp;.&amp;nbsp;&lt;br /&gt;Sometimes just adding &amp;quot;github&amp;quot; to an aras specific question in google helps.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But when you have a subscription, you can always ask Aras support for these kind of stuff!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Promote Dropdown dinamically</title><link>https://www.aras.com/community/thread/9273?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 10:55:35 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:c9a3f927-28ed-449b-9472-bc64678c520d</guid><dc:creator>FernandoCG</dc:creator><description>&lt;p&gt;Thank you very much Angela. It works perfectly. &amp;quot;Eres un Sol&amp;quot; (Spanish expression, hehe)!!!&lt;/p&gt;
&lt;p&gt;I did not answer you before because in Andalusia, Spain, we have had 2 days of vacation, &amp;quot;Dia de Andalucia&amp;quot;.&lt;/p&gt;
&lt;p&gt;The code works perfectly, I only have to change where I would collect the data, since I take it from a table and not from a LIST of ARAS, but I already know how to do it. I did it, it works perfectly.&lt;/p&gt;
&lt;p&gt;It gives me courage, because I have looked everywhere, google, forum, PDF and I did not find anywhere information on how to do it in the version that I have. All the examples that I saw and tried gave me an error and were examples that the forum partners marked as valid.&lt;/p&gt;
&lt;p&gt;What&amp;#39;s more, I have tried to search for the code that you have put in the PDFs and still nothing appears. I don&amp;#39;t know.&lt;/p&gt;
&lt;p&gt;Thank you so much. Eternally grateful!!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Promote Dropdown dinamically</title><link>https://www.aras.com/community/thread/9260?ContentTypeID=1</link><pubDate>Fri, 24 Feb 2023 12:37:55 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:aaeff088-3bac-4829-a9fa-4ed199487d77</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;Well, the way&amp;nbsp;to work with dropdowns changed around 3 times over the years. There is a difference between 11SP9, 11SP11 and 11SP15 :).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;This way I found this&amp;nbsp;Innovator 11SP9 code that filled a dropdown in Form based on a List item:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;var inn = new Innovator();&lt;/p&gt;
&lt;p&gt;// Get dropdown element from&amp;nbsp;Form&lt;br /&gt;var div_startpage = getFieldByName(&amp;quot;mydropdown&amp;quot;).id;&lt;br /&gt;var control_items = div_startpage.substring(0, div_startpage.indexOf(&amp;quot;span&amp;quot;));&lt;br /&gt;var select = document.getElementById(control_items);&lt;/p&gt;
&lt;p&gt;// Get&amp;nbsp; list values&lt;br /&gt;var listValues = [];&lt;br /&gt;listValues = aras.getListValues(&amp;quot;BFDEFE0CEE174B....&amp;quot;); // id of List &amp;quot;xy&amp;quot;&lt;br /&gt;for (var i = 0; i &amp;lt; listValues.length; i++) { &lt;br /&gt; var value = aras.getItemProperty(listValues[i], &amp;quot;value&amp;quot;);&lt;br /&gt; var label = aras.getItemProperty(listValues[i], &amp;quot;label&amp;quot;);&lt;br /&gt; var option = document.createElement(&amp;#39;option&amp;#39;);&lt;br /&gt; &lt;br /&gt; select.options[i] = new Option(label, value); // fill dropdown list&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;No Idea if it works :D&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>