- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2022 05:06 AM
Each of the field values need to have the following points assigned to each value for the calculation
a. Capability
1. Low = 1 point
2. Medium = 2 points
3. High = 3 points
b. Associates
1. < =100 = 1 Point
2. 101 to 1,000 = 2 Points
3. 1,001 to 10,000 = 3 Points
4. 10,001 to 50,000 = 4 Points
calculation should sum up the associated points for each value selected in capability, Associates fields
The "Effort " field needs to be a calculated field based on two other fields which are mentioned, and populate these choice depend on calculation
- a. Not Prioritized - 0 points
- b. Low - less than or equal to 5 points
- c. Medium - greater than 5 points but less than or equal to 9 points
- d. High - 10 or higher points
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2022 08:53 AM
Hi @venkat Y
You can create Choices of field as below:
Then you can write below code in your 2 onChange Client Script for Capabilities and Associates field:
var cap = parseInt(g_form.getValue("u_capability");
var ass = parseInt(g_form.getValue("u_associates");
var eff = cap+ass;
if(eff==0)
{
g_form.setValue('u_effort','Not Prioritized'); // value of choice 'Not Prioritized'
} else if (eff<=5) {
g_form.setValue('u_effort','Low'); // value of choice 'Low'
} else if (eff>5 && eff<=9) {
g_form.setValue('u_effort','Medium'); // value of choice 'Medium'
} else if (eff>10) {
g_form.setValue('u_effort','High'); // value of choice 'High'
}
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2022 08:53 AM
Hi @venkat Y
You can create Choices of field as below:
Then you can write below code in your 2 onChange Client Script for Capabilities and Associates field:
var cap = parseInt(g_form.getValue("u_capability");
var ass = parseInt(g_form.getValue("u_associates");
var eff = cap+ass;
if(eff==0)
{
g_form.setValue('u_effort','Not Prioritized'); // value of choice 'Not Prioritized'
} else if (eff<=5) {
g_form.setValue('u_effort','Low'); // value of choice 'Low'
} else if (eff>5 && eff<=9) {
g_form.setValue('u_effort','Medium'); // value of choice 'Medium'
} else if (eff>10) {
g_form.setValue('u_effort','High'); // value of choice 'High'
}
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2022 09:13 PM
@AnubhavRitolia woww nice Anubhav, Thanks for the code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2022 02:39 AM
Most welcome.
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023