Percentage calculation through script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 03:15 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 03:38 AM
Hi @dotfullstop ,
Below link has the answer
https://www.servicenow.com/community/developer-forum/calculate-percentage/m-p/2027044
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 03:54 AM
I saw that solution but he has written on load, but i want to update it on change of "current" name field