Percentage calculation through script

dotfullstop
Tera Contributor

Hello All,

 

I have a requirement where we have a table name "table 1" and we have two field "current" and "Total" we have a third field "percentage". i want to write a script where i can get the percentage of current and if it percentage is less then 5% then it should trigger a notification to email-id.

might be we can use this formula (current-Total/total*100)

 

Thanks in advance

2 REPLIES 2

Basheer
Mega Sage

Hi @dotfullstop ,

Below link has the answer

https://www.servicenow.com/community/developer-forum/calculate-percentage/m-p/2027044

 

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.

I saw that solution but he has written on load, but i want to update it on change of "current" name field