- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2017 06:34 PM
Hello Everyone.
I am trying to create a business Rule to take the number from u_number_of_standard_server_software (right now I have this field as a string, I can change to integer if that will help).
Multiply it by 6,439
Get the answer and populate it in u_standard_server_software_annual (read-only Currency field)
Here is my code
Thanks for all your help. I will make sure i mark your advice as helpful or correct if you can help me solve this problem.
Denee
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2017 08:53 PM
In your business rule, you can try like this,
var value = parseInt(current.u_number_of_standard_server_software)* 6349;
current.u_standard_server_software_annual_amount = current.u_standard_server_software_annual_amount + ';' + value;
But i believe this can easily be done through onChange() client script on u_number_of_standard_server_software field to get the calculation done, like
var val = (parseInt(newValue) * 6349);
g_form.setValue('u_standard_server_software_annual_amount', val);
Let's see if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2017 11:55 PM
sishir,
Actuallu i am neew to this community .
If I want to send a mail to any of the member or personal chat , how would i do that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2017 05:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2017 07:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2017 07:54 AM
Thanks Kunal
I figured it out.
Denee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2021 08:45 PM
(function executeRule(current, previous /*null when async*/) {
var mil=current.u_string_1.getDisplayValue();
var math=current.u_string_3.getDisplayValue();
var eng=current.u_string_4.getDisplayValue();
var sci=current.u_science.getDisplayValue();
gs.addInfoMessage("Calculate wil start here");
current.u_string_5=parseInt(mil+math+eng);
gs.addInfoMessage("Record will sbmit now");
//current.u_string_5=current.total;
gs.addInfoMessage("Record will sbmit now:" +'u_string_5');
i wrote this business rule to add 4 field and popupate the value on 5th field, but the problem is i'm able to multiply but unable to add , by adding with (+) , it adding as a string, ex-10+20=1020.
how can i declare this as an integer, kindly help me out