- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2024 12:12 AM
Hello,
I am trying to create a Relationship:
Queries Table: Sys_User
Applies to Table: Sys_User
For the Query With I am using the following:
This gives me all the Directors of the Department that matched the current user records department.
I am trying to narrow it down the direct Director of the current user record within the same department
For Example: View User Record John Doe
John Doe Manager: Jane Doe (Title starts with Mgr)
Jane Doe Manager: Timmy D (Title starts with Sr Mgr)
Timmy D Manager: Edgar J (Title Starts with Dir) - return Edgar D in the related list
I tried the following:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2024 03:22 PM - edited 08-17-2024 05:41 PM
Seems you didn't read the information at the link I posted. And looking at the last attachment of your script, you have at line 4
'var msg= current.addQuery('sys_id',parent.sys_id);'
and the debug doesn't show for lines 6 and 7
gs.log("Attempt for Current SysID: " + msg.sid);
I believe you may need to use parent.sys_id ???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2024 12:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2024 03:22 PM - edited 08-17-2024 05:41 PM
Seems you didn't read the information at the link I posted. And looking at the last attachment of your script, you have at line 4
'var msg= current.addQuery('sys_id',parent.sys_id);'
and the debug doesn't show for lines 6 and 7
gs.log("Attempt for Current SysID: " + msg.sid);
I believe you may need to use parent.sys_id ???