- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2023 04:04 AM
Hi,
I have 2 fields, "Max Users count" field with integer type and "MAX user Volume %" field with string. These fields are on some x table, same table is related to sys_user table.
If any update in "Max Users count" field
for example: 100
then field "MAX user Volume %" should update as 100%,
I want to calculate Percentage on "MAX user Volume %" based on the value in "Max Users count" field. Please help
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2023 10:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2023 08:29 AM
Hi @Ash41 ,
You just want add % to the Max User count and update on to the MAX user Volume field??
looking at your example it just adds % if so , just configure a BR/flow when Max User count changes , add same value with %
if not whats the Percentage canculation logic???
need more info here
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2023 12:56 PM
Here's script logic if you choose to do that in a business rule
var intValue = 100;
var intStr = intValue.toString();
intStr += "%";
gs.info('intValue = ' + intValue + ', intStr = ' +intStr);If used in a business rule, delete line 1 and change line 2 to
var intStr = current.u_max_user_count.toString();use the correct column name for u_max_user_count.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-12-2023 09:38 PM
Hi,
Sorry may be my example was wrong in question.
what ever value is given in "Max Users count" field is should be considered as 100%.
Then, there is one more field it should populate percentage of users added to table sys_user table based on "Max Users count" field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2023 10:56 PM
created new field and calculated % of field, issue resolved
