Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Auto-populate percentage on a field

Vaishali 11
Tera Guru

Hi, 

I have a requirement where on the intake form there are 2 fields, total cost and % of funding. There is a 3rd field total funding cost which populates the percentage value of above fields. For ex, if % of funding-60, total cost- 100 then total funding cost should show 60.

How this can be achieved?

 

Thanks in advance!!

5 REPLIES 5

kaushal_snow
Giga Sage

@Vaishali 11 ,

 

You can create an OnChange client script on both total cost and % funding fields, get their numeric values (use g_form.getDecimalValue(...) if they are currency/number fields), compute totalCost * (percentFunding/100), and use g_form.setValue(...) to populate total funding cost.........

 

If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/