<?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>field auto sum</title><link>https://www.aras.com/community/f/development/3597/field-auto-sum</link><description>I am new to Aras development.
I m stuck on below requirement.
I have 2 field name A &amp;amp; B.
If I have provided value eg. field1 = 40% in field A , field B automatically comes = 60%.on click event.</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: field auto sum</title><link>https://www.aras.com/community/thread/1400?ContentTypeID=1</link><pubDate>Tue, 06 Mar 2018 00:03:24 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:2bb0f6eb-e6c7-4b43-9fa1-caaae02b2f83</guid><dc:creator>Former Member</dc:creator><description>Thank you  Eli Donahue.
I have made slight changes but both are working fine.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: field auto sum</title><link>https://www.aras.com/community/thread/1367?ContentTypeID=1</link><pubDate>Thu, 22 Feb 2018 16:49:35 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:4bc25ad0-9187-46dc-bce5-828089106cab</guid><dc:creator>Eli Donahue</dc:creator><description>Hi Sanu,

Just to confirm I understand your question: You want the user to enter a value in Field A, click a button, and have a calculated value appear in Field B? If that is the case, you can do something like this in an onClick event on the button field:
&lt;pre&gt;var a = getFieldByName(&amp;quot;Field A&amp;quot;).getElementsByTagName(&amp;quot;input&amp;quot;)[0];
var b = getFieldByName(&amp;quot;Field B&amp;quot;).getElementsByTagName(&amp;quot;input&amp;quot;)[0];
var diff = 100 - a.value;
b.value = diff;&lt;/pre&gt;
Eli

&lt;hr /&gt;

Eli Donahue

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