- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2016 12:52 PM
Hi
I would like to set one field base on the values of two other fields. Similar to when impact and urgency is selected on a incident form it sets the priority. I have 3 fields on a form A, B and C. I would like to set C based on the values set by the user in fields A and B, after I have done some processing.
I know the logic of what needs to be done but don't know how/where to put the logic in ServiceNow - is it Client script, business rules etc.
Can someone provide me with some guidance please?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2016 02:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2016 01:05 PM
Impact Urgency Priority calculations are either done in client script or Data Lookups.
If your fields A, B, C are dropdowns and you want to calculate the value in C before submitting the form, Data Lookups or client scripts are the way to go.
If your fields A, B, C are not dropdowns and you have the logic of setting C, use Client scripts.
If i dont answer your question give more details about the requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2016 01:12 PM
Thanks Sumeet. I will read up on both client script and data Lookups as a way forward.
Both A and B are reference fields in two separate tables which I then process to create a new value to be stored in field C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2016 01:17 PM
Can be done in BR and Client scripts. Data lookups cannot help.
BR is the easiest way to place your logic.
If you want it to be dynamic enough, using GlideAjax in client script will help. In this way, after selecting a value in A and B, value in C can automatically be made available being on the same form even before submit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2016 02:09 AM
Yeah - I tried Data Lookup but it did not work for me.
I would like the value to be shown on the form before it is submitted but my problem is that I have no idea where to begin with ServiceNow scripting much less with GlideAjax option.
The logic I have is simple and it works in standard javascript. Thanks for your suggestions. I will look into BR etc.