- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 10:15 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2024 03:22 PM
Please also take a screenshot of the other field - promptstructure.
But even from this screenshot a problem can be seen: type is of type String in which you are looking for a sys_id.
That is theoretically possible but very NOT likely.
So the problem could be line
serviceTypeGR.addQuery('type', selectedType);
in the Script Include.
It is possible and likely that what you mean is:
serviceTypeGR.addQuery('sys_id', selectedType);
which can be short-handed to:
...
// Query the 'ServiceType' table and retrieve questions
var serviceTypeGR = new GlideRecord('x_1296451_legaladv_servicetype');
if (serviceTypeGR.get(selectedType)) {
gs.addInfoMessage('serviceoog' + serviceTypeGR);
promptStructure = serviceTypeGR.getValue('promptstructure');
}
gs.addInfoMessage('promptStructure ' + promptStructure);
...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2024 03:07 PM
It looks like there is NO record in table x_1296451_legaladv_servicetype where field type has value 7f11...10b1.
Or the table name is not correct, or the field names (type and/or promptstructure) are not correct and thus the query/lookup is failing.
It would help if you could post a screenshot of the definition form of the table where the names (not labels!) of those fields is visible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2024 03:54 PM
Screen Shot prompt Structure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2024 03:58 PM
That clears it, thanks.
Now a final question: where exactly (on which table) is this Client Script defined?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2024 04:05 PM
Client Script defined on Service request table where i define reference field for service type
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2024 03:17 PM
list where record exist