<?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 Items To Change – how to change dropdown labels?</title><link>https://www.aras.com/community/f/development/3558/add-items-to-change-how-to-change-dropdown-labels</link><description>Hi,

I created a custom CM process and added it into the Add Items To Change List by modifing the Methods:
- PE_ChooseCMItem_API 
--&amp;gt; this.ChangeItemList = top.aras.newArray(&amp;quot;Simple MCO&amp;quot;, &amp;quot;Express ECO&amp;quot;, ..., &amp;quot; ABC_MyMagicChange_Main &amp;quot;);
- PE_AddChangeItem</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Add Items To Change – how to change dropdown labels?</title><link>https://www.aras.com/community/thread/1293?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2018 11:07:04 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:60db271f-cd2b-4e30-af87-0f79a17734bc</guid><dc:creator>AngelaIp</dc:creator><description>Hi Chris,

while doing my tests yesterday after 10 minutes I came to the same conclusing as you. It looked easy to do, but wasn´t.

I had already begun customizing the ItemType when I discovered that the drop-down label feature is already implemented in the API, but just is not used. The missing label function just requires the modification of 3 lines of code and an additional array for the label. 

Around line 9: Add label array, it must match to the ChangeItemList
&lt;code&gt;this.ChangeItemLabels = top.aras.newArray(&amp;quot;Simple MCO&amp;quot;, &amp;quot;Express ECO&amp;quot;, &amp;quot;Express DCO&amp;quot;, &amp;quot;Magic Change&amp;quot;);&lt;/code&gt;

Around line 40: Add handling of label list:
&lt;code&gt;var changeItemLabel = this.ChangeItemLabels[i];&lt;/code&gt;

Around line 49: Change function call
&lt;pre&gt;&lt;code&gt;//var option = this.AddOptionToDropDown(this.ChangeTypeInput, changeItemName);
var option = this.AddOptionToDropDown(this.ChangeTypeInput, changeItemName, changeItemLabel);&lt;/code&gt;&lt;/pre&gt;


Around line 58: Change text to id
&lt;pre&gt;&lt;code&gt;// var selectedType = this.ChangeTypeInput[this.ChangeTypeInput.selectedIndex].text;
var selectedType = this.ChangeTypeInput[this.ChangeTypeInput.selectedIndex].id;&lt;/code&gt;&lt;/pre&gt;


Around line 153: Change text to id
&lt;pre&gt;&lt;code&gt;// result.type = this.ChangeTypeInput[this.ChangeTypeInput.selectedIndex].text;
result.type = this.ChangeTypeInput[this.ChangeTypeInput.selectedIndex].id;&lt;/code&gt;&lt;/pre&gt;


Somehow, that was even easier than rebuilding my ItemType...&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add Items To Change – how to change dropdown labels?</title><link>https://www.aras.com/community/thread/1285?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2018 10:27:11 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:c1e53ac6-9a43-43e7-b2a8-5351b8605075</guid><dc:creator>Christopher Gillis</dc:creator><description>Hi Angela,

In order to use labels, you would need to rewrite a large part of the &lt;em&gt;PE_ChooseCMItem_API&lt;/em&gt; to support this change. While it would certainly be possible to do that, the easiest solution would be to change the name of your new CM process to something more readable in the dropdown.

Chris

______________________________________

Christopher Gillis

Aras Labs Software Engineer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>