Data Lookup for extended table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2017 02:18 AM
Hi Community,
I extended the table incident and now I want to expand out-of-the-box Priority Data Lookup onto this new table.
So I created new entry in dl_definition with the Source Table = MyNewTable and all other options (including Matcher Table) exactly like in "Priority Lookup", the ootb Data Lookup Definition for incident. I also replicated Matcher Field Definitions and Setter Field Definitions.
And then... nothing happens! Priority is still automatically calculated in incident, but not in MyNewTable.
Is anyone aware of any caveats here? - thanks in advance!
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2017 03:10 AM
Please confirm if the source_table field on your matcher field definition records and setter field definition is your custom table and not the incident table. You can add the field on list layout or check XML of these records.
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2017 03:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2017 05:15 AM
In the meantime I tried to inherit from dl_u_priority and specify this new table as Matcher Table, and recreate any Matcher/Setter Field Definitions, and populate new table with some value pairs... with the same zero result though, lookup doesn't work for the table which extends incident.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2017 02:08 AM
Found similar issue Two datalookup definitions with same matcher table
not satisfied at all though, gonna raise it on HI...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2017 10:36 AM
I know I am late to this discussion, however if someone runs into this...
Says here in the wiki.
Data Lookup Definitions are not inherited by extension tables. For example, a Data Lookup Definition on the Task table cannot match values on the Incident incident table.
Here is a workaround to get around that issue for Priority Data Lookup. Just make a script to lookup the values instead from the table.
Here is an example client script
Client Script: Set Priority
Inherited: true
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading){
return;
}
if(newValue == ''){
g_form.setValue('u_priority', '');
return;
}
var grPriorityList = new GlideRecord('dl_u_priority');
grPriorityList.addQuery('impact', g_form.getValue('u_impact'));
grPriorityList.addQuery('urgency', g_form.getValue('u_urgency'));
grPriorityList.query(setPriority);
function setPriority(grPriorityList) {
if (grPriorityList.next()) {
g_form.setValue('u_priority', grPriorityList.priority);
}
}
}