<?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>How to use length function in aras?server side method.</title><link>https://www.aras.com/community/f/development/3780/how-to-use-length-function-in-aras-server-side-method</link><description>//code to validatde item_number should not be more than 20 characters.

Innovator inn=this.getInnovator();
Item itmid=this.getProperty(&amp;quot;item_number&amp;quot;);
//return this.getInnovator().newError(&amp;quot;hello&amp;quot;);
if(itmid.Length == 20)
{
return this.getInnovator()</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to use length function in aras?server side method.</title><link>https://www.aras.com/community/thread/1296?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2018 11:25:28 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:35836074-be08-404c-bf54-ece63b02ae69</guid><dc:creator>Christopher Gillis</dc:creator><description>Hello,

One of our Aras Labs team members recently put together a list of helpful resources for learning Aras Innovator which you can find &lt;a href="http://community.aras.com/en/helpful-resources-aras-innovator/"&gt;here&lt;/a&gt;. The Developer Resources section in particular contains some useful links for getting started with customizing Innovator.

Chris

_________________________________

Christopher Gillis

Aras Labs Software Engineer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use length function in aras?server side method.</title><link>https://www.aras.com/community/thread/1295?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2018 11:02:17 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:14da7d83-c6dc-418a-9df3-a19472a1499c</guid><dc:creator>Kara</dc:creator><description>Mr.Chris,

Thanks for help!

Being a new to ARAS can you give me some tips to write methods efficiently using client events.

Can you give methods to refer.

&amp;nbsp;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use length function in aras?server side method.</title><link>https://www.aras.com/community/thread/1292?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2018 10:01:14 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:d77fc4fd-4d16-4e26-9fce-63253cb9be42</guid><dc:creator>Christopher Gillis</dc:creator><description>Hi BK,

The &lt;em&gt;getProperty&lt;/em&gt; function returns a string, not an Item.

You should update your code as shown below to declare the &lt;em&gt;itmid&lt;/em&gt; variable to be a string.

&lt;pre&gt;&lt;code&gt;Innovator inn=this.getInnovator();
string itmid=this.getProperty(&amp;quot;item_number&amp;quot;); // &amp;lt;-- getProperty returns a string
//return this.getInnovator().newError(&amp;quot;hello&amp;quot;);
if(itmid.Length == 20)
{
return this.getInnovator().newError(&amp;quot;Invalid Value!&amp;quot;);
}
return this; // &amp;lt;-- Server-side methods always need to return an Item&lt;/code&gt;&lt;/pre&gt;


Chris

___________________________

Christopher Gillis

Aras Labs Software Engineer&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use length function in aras?server side method.</title><link>https://www.aras.com/community/thread/1294?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2018 02:23:41 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:e84d8989-b27c-4e09-89b8-cc819cc1e1bc</guid><dc:creator>Kara</dc:creator><description>can we write this for client side?

can you just tell the code

&amp;nbsp;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use length function in aras?server side method.</title><link>https://www.aras.com/community/thread/1291?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2018 01:12:26 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:5b70e499-146d-4622-8fab-48b713122e3e</guid><dc:creator>Zahar Chernov</dc:creator><description>Replace following line:
&lt;blockquote&gt;Item itmid=this.getProperty(“item_number”);&lt;/blockquote&gt;
With:
&lt;blockquote&gt;Item itmid=this.getProperty(“item_number”, &amp;quot;&amp;quot;);&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>