Need assistance with logic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2024 03:27 AM
Hi All,
I have a catalog item in ServiceNow with five variables, each with four choices. Each choice has an associated score.
For example:
Variable 1:
- Choice 1: Score 50
- Choice 2: Score 40
- Choice 3: Score 30
- Choice 4: Score 20
(Note: Scores are only for the logic not available on catalog item)
I want to set the value of a new read-only variable based on the total score of the choices selected for the first five variables. If the total score is 70 or higher, the read-only variable should be set to "Very high"; If the total score in between 50 to 69 then set to "high" and so on...
New read-only variable auto-populate value based on total score:
SCORE | Value |
1 | Very Low |
20 | Low |
30 | Medium |
50 | High |
70 | Very High |
How can I achieve this using a Catalog Client Script in ServiceNow?
If I used onChange client script on last variable then there is possibility end user will change the value of previous varibles then it will cause issue..please suggest approach(I cant used flow designer because already I m using Workflow for the same catalog)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2024 05:35 AM
If you allow any of the variables to change, you will need to do it on change of every one of those variables. Again: calculating one value, based on 19 on which you allow for any of those 19 to change, you will need 19 on change client scripts to trigger the calculation. This is absolutely not practical, but it is the way you are configuring it yourself.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark