Calculated Fields- Subtract one field from Another field, and Output to a third field

Charles20
Kilo Explorer

I am new to ServiceNow, and I will preface this by admitting that I suck at scripting. What I aim to do seems simple to me, but I am failing. I have three integer fields; I want the second field to subtract it's value from the first field, and output that number to the third field. I want to do this from a Calculated Field script.

1- Am I going about this the wrong way?

2- Would the Calculation best be run in the second or third field? Basic Concept: Value of Field 1 Minus Value of Field 2 outputs to Field 3.

Any assistance you all can provided would be greatly appreciated.

-Chuck

1 REPLY 1

Mohit Kaushik
Mega Sage
Mega Sage

Hi Charles,

 

Please refer the below link it will help you in resolving the issue.

https://community.servicenow.com/community?id=community_question&sys_id=0fd7c32ddb1cdbc01dcaf3231f96...

 

Please mark it correct if it resolves the issue or helpful if it helps you at all.

 

Thanks,

Mohit Kaushik

Thanks,
Mohit Kaushik
ServiceNow MVP (2023-2025)