<?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>Save values in Item type</title><link>https://www.aras.com/community/f/development/3750/save-values-in-item-type</link><description>Hello

I made 2 Item Type , the first one called (Input) , the second is Result .

i made 4 input in the first one ( Input ) and i want to save the values in Result .&amp;#160;Result contain fields : Id , date , name ,&amp;#160;comment

i passed the value in server side</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Save values in Item type</title><link>https://www.aras.com/community/thread/1738?ContentTypeID=1</link><pubDate>Tue, 26 Jun 2018 08:07:08 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:72d4aa8b-19df-43fb-a24b-4b39215e4864</guid><dc:creator>Former Member</dc:creator><description>thank you for your help .

if i use the same value , there ist no problem for exmaple :

Innovator innovator = this.getInnovator();

string input = this.getProperty(&amp;quot;string&amp;quot;);

string input1 = this.getProperty(&amp;quot;string1&amp;quot;);

Item newResult = innovator.newItem(&amp;quot;Result&amp;quot;,&amp;quot;add&amp;quot;);
&lt;blockquote&gt;&lt;span&gt;&lt;em&gt;&lt;strong&gt;newResult.setProperty(&amp;quot;id_input&amp;quot;,&lt;span&gt;input1&lt;/span&gt;);&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt;

&lt;span&gt;&lt;em&gt;&lt;strong&gt; newResult.setProperty(&amp;quot;date&amp;quot;,&lt;span&gt;input1&lt;/span&gt;); &lt;/strong&gt;&lt;/em&gt;&lt;/span&gt;&lt;/blockquote&gt;
newResult = newResult.apply();

return innovator.newResult(input1);&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Save values in Item type</title><link>https://www.aras.com/community/thread/1732?ContentTypeID=1</link><pubDate>Mon, 25 Jun 2018 07:32:50 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:7c3fb715-c671-4a9e-bff9-84441745f23b</guid><dc:creator>AngelaIp</dc:creator><description>I don´t know if this really is the problem, but you often use the var type and .ToString(). For this use case, there is no need to transform the data types.

&lt;pre&gt;&lt;code&gt;Innovator innovator = this.getInnovator();
string input = this.getProperty(&amp;quot;string&amp;quot;);
string input1 = this.getProperty(&amp;quot;string1&amp;quot;);
...

Item newResult = innovator.newItem(&amp;quot;Result&amp;quot;,&amp;quot;add&amp;quot;);
newResult.setProperty(&amp;quot;id_input&amp;quot;,input);
newResult.setProperty(&amp;quot;date&amp;quot;,input1);
...

newResult = newResult.apply();
return innovator.newResult(input1);&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Save values in Item type</title><link>https://www.aras.com/community/thread/1729?ContentTypeID=1</link><pubDate>Mon, 25 Jun 2018 07:22:39 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:8a3471e3-28fb-45d6-a0bc-46d8703812b8</guid><dc:creator>Former Member</dc:creator><description>With this code can i save input_id

but if i add date , comment and name can i not add the values .&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Save values in Item type</title><link>https://www.aras.com/community/thread/1728?ContentTypeID=1</link><pubDate>Mon, 25 Jun 2018 07:07:56 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:0687451e-d021-4a49-942b-d01f6c216864</guid><dc:creator>Former Member</dc:creator><description>Hello , Thank you for your response .

1.i did not get Error ,

2.properties is called dat and kind is date

5. i make the Permissions  correct

if i save only 1 property there is no problem for example :

Innovator innovator = this.getInnovator();

var input = this.getProperty(“string”);

Item newResult = innovator.newItem(“Result”,”add”);

newResult.setProperty(“input_id”,input.ToString());

newResult = newResult.apply(input);

return innovator.newResult(input);

With this code can i save input_id but if i add comment and date in name can i not&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Save values in Item type</title><link>https://www.aras.com/community/thread/1726?ContentTypeID=1</link><pubDate>Mon, 25 Jun 2018 04:18:45 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:53a216f3-cb01-4654-970f-cb297d334361</guid><dc:creator>AngelaIp</dc:creator><description>Without knowing the exact structure of your itemtypes, it´s hard to say whats missing.

1. Do you get any error message?
2. If not, add an error handler to the apply Method:

&lt;pre&gt;&lt;code&gt;newResult = newResult.apply();
if (newResult .isError())
{
    return inn.newError(newResult .getErrorDetail()); 
} &lt;/code&gt;&lt;/pre&gt;


3. One of your properties is called &lt;code&gt;date&lt;/code&gt;. Is this one really a &lt;code&gt;String&lt;/code&gt; property?
4. Are the field sizes equal?
5. Can Add / Permissions correct?
6. If you try the other properties indepentently, do they all work?
7. Where do you trigger this code and which event is used?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Save values in Item type</title><link>https://www.aras.com/community/thread/1721?ContentTypeID=1</link><pubDate>Thu, 21 Jun 2018 07:27:54 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:d4afe86b-2305-4128-a4ec-38fd6eef4b04</guid><dc:creator>Former Member</dc:creator><description>Thank you for your response .
if I save only one value, there is no problem, for example

Innovator innovator = this.getInnovator();

var input = this.getProperty(“string”);

var input1 = this.getProperty(“string1”);

var input2 = this.getProperty(“string2”);

var input3 = this.getProperty(“string3”);

Item newResult = innovator.newItem(“Result”,”add”);

newResult.setProperty(“input_id”,input.ToString());

newResult = newResult.apply(input);

but if I save id, date, name, comment does not work . the new code is :

Innovator innovator = this.getInnovator();

var input = this.getProperty(“string”);

var input1 = this.getProperty(“string1”);

var input2 = this.getProperty(“string2”);

var input3 = this.getProperty(“string3”);

Item newResult = innovator.newItem(“Result”,”add”);

newResult.setProperty(“id_input”,input.ToString());

newResult.setProperty(“date”,input1.ToString());

newResult.setProperty(“name”,input2.ToString());

newResult.setProperty(“comment”,input3.ToString());

newResult = newResult.apply();

return innovator.newResult(input1);&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Save values in Item type</title><link>https://www.aras.com/community/thread/1718?ContentTypeID=1</link><pubDate>Thu, 21 Jun 2018 02:36:31 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:d8d25282-a5db-4ed5-8e1a-674fbe27599d</guid><dc:creator>AngelaIp</dc:creator><description>I guess this line will make some trouble:

&lt;code&gt;newResult.setProperty(“id”,input.ToString());&lt;/code&gt;
Id is a system property, so you cannot overwrite it. If you want to link the Input-Item, use an additional property for storing the value:

&lt;code&gt;newResult.setProperty(“input_id”,input.ToString());&lt;/code&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>