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
08-08-2025 11:11 AM
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
08-10-2025 10:13 PM - edited 08-10-2025 10:15 PM
Hello @Rekha20 ,
Thanks for clarification regarding variable.
As you're using lookup select box, Kindly update reference qualifier using following code.
javascript: sn_hr_core.HRCustomUtils1().getRequestTypeQualifier(current.variables.User_id_variable_name);
Kindly change sn_hr_core if script include belong to different scope and update 'User_id_variable_name' with your request for variable name. After javascript keyword there should be colon and then script include name.
and update variable attributes with :
ref_qual_elements =User_id_variable_name
update 'User_id_variable_name' with your request for variable name.
and update script include function initial part like following with parameter in function
getRequestTypeQualifier: function(user_id) {
gs.info("[HRCustomUtils1] === Method getRequestTypeQualifier() TRIGGERED ===");
var userID = user_id;
gs.info("[HRCustomUtils1] Incoming userID: " + userID);
Disable client script and Kindly try this way as it's loop up select box.
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
08-10-2025 10:59 PM - edited 08-10-2025 11:18 PM
Hi @Sunny3008
Thanks for your response.
I have updated Script Include: Client Callable-
Variables Name:
This way it is not triggering any logs. nothing.
Should it not be server side code if calling in advance reference qualifier?
Please suggest me further.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2025 12:45 AM
Hi @Sunny3008
Seems working after making script Include sever side. One issue I see- Drop down choices are not in order defined in Request Type table as we have u_order field on this table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2025 01:46 AM
Hello @Rekha20 ,
Kindly try to update variable attribute as
ref_ac_order_by=u_order,ref_qual_elements=subject_person
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
08-11-2025 01:49 AM
Hi @Sunny3008
Tried but no luck.
Tried:
ref_auto_completer=AJAXTableCompleter;ref_order_by=u_order still no luck