- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2024 11:12 AM
Hi All,
I am new to this community and ServiceNow and have zero scripting experience. So, is there any way to aggregate two integer fields without scripting?
Simpley, The calculation should be: Total Units= Total Units + Add Tokens.
Regards,
Mo
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2024 11:50 AM
Hi @Mohamed Elsayed ,
There is a way without using GlideAggregate you can simplly do like -
Right click on the field in which you need to store the response and add this line of code
(function calculatedFieldValue(current) {
// Add your code here
var a = current.u_a;
var b = current.u_b;
var c = current.u_c;
var d = current.u_d;
return a+b+c+d; // return the calculated value
})(current);
For emaple in my Incident form there a 5 fields - A,B,C,D and E
E stors the sum of A,B,C,D
Result
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2024 04:59 AM
Can you refer this video it might be helpful
https://youtu.be/p3ddcJDmRcE?si=p_gBs8MFY9KE-bUM
Mark it Helpful and accept solution!! If this helps you to understand.