Fetch records based on logged in user from a custom table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi All,
I have created a custom a table sn_hr_core_request_type, having fields like below
I have created an HR Service which associated with an Record Producer, record producer is having variable:
I need to show Request type choices based on available for country field based on who is this request for variable changes.
I have craeted script include:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hello @Rekha20 ,
It seems you're passing the Catalog Item sys_id from the client script, but in your Script Include, you're querying the u_hr_service field on your custom table. This mismatch could be the reason why no valid request types are returned.
To fix this, please make sure your custom table sn_hr_core_request_type has appropriate reference fields (like u_catalog_item or u_record_producer), and then adjust your Script Include query accordingly.
For example, if you’re associating the request type with the Catalog Item, then you can update your GlideRecord query like this:
Make sure the field u_catalog_item (or your appropriate reference field) is correctly populated with the Catalog Item or Record Producer references.
✅ Mark this as helpful if it resolves your issue.
Thanks,
Sunny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago - last edited 4 weeks ago
Hi @Sunny3008
I have updated a code more direct:
Client Callable script include:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hello @Rekha20 ,
Can you please let me know what is type of variable 'u_request_type'.
If it's select box then you can add choices using.
g_form.addOption('u_request_type', 'response', 'response', 1);
Kindly help with additional details.
Mark this as helpful if it resolves your issue.
Thanks,
Sunny R
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago - last edited 4 weeks ago
Hi @Sunny3008
Yes, Request Type is Look up select box.
FYI- response from Script include is coming as: