- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2018 01:56 AM
Hi,
As we all know Priority is a field in Task table. When we create a custom table and extend it from Task table, priority field also get mapped to custom table.
My requirement here is, how do i set priority automatically based on Impact and urgency fields.
Can someone plz assist here?
Regards,
Alok
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2018 02:02 AM
Hi Alok,
create one new Data lookup for your custom table.
under System Policy--> Rules-->Data Lookup Definition
Data lookup rule.
In Source table : Select your custom table
In target table :Select priority data lookup
And Save
refer screen for exa:
Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy.
Jaydeep Parmar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2018 02:02 AM
Hi Alok,
create one new Data lookup for your custom table.
under System Policy--> Rules-->Data Lookup Definition
Data lookup rule.
In Source table : Select your custom table
In target table :Select priority data lookup
And Save
refer screen for exa:
Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy.
Jaydeep Parmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2018 02:47 AM
Thank you Jaydeep 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2018 02:04 AM
Hi Alok,
please try with below code:
Name: calculatePriority
Table: Global
Script:
var pVal = '4';
//Query the priority lookup table to find the priority based on impact and urgency
var rec = new GlideRecord('u_priority_lookup');
rec.addQuery('u_impact', impact);
rec.addQuery('u_urgency', urgency);
rec.query();
while(rec.next()){
pVal = rec.u_priority;
}
return pVal;
}
NOTE: Mark correct or helpful if it helps you.
Warm Regards,
Raj patel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2018 02:47 AM
Thank you Raj 🙂