- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2019 10:19 AM
I am trying to create a Catalog Item with (among other things) the following two fields: Submitter and Approver.
I want to put a filter on the Approver field, so it is dependent upon the Submitter. Basically, the choices for Approver should be limited to:
- Submitter's Manager
- Submitter's Manager's Manager
I don't foresee having to go much further than that (although I would not be opposed to adding one level higher; the Submitter's Manager's Manager's Manager).
I am not sure what that filter would look like. Can someone help?
Thanks
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2019 03:08 AM
Here is the screenshot, use this as reference.
Script Include:
Variable where filtered result is required, for your case it is approver
Here is the output:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2019 10:28 AM
Hi,
Try using script include, where you can return 'sys_idIN'+submitter.manager.sys_id+','+submitter.manager.manager.sys_id; call that script include in advance reference qualifier of your approver variable.
Regards,
Mandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2019 11:43 AM
That worked. Thank you very much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2019 11:56 AM
OK, that did work, but I just came across something I didn't consider. I am defaulting the Submitter to the current user, and it shows the managers for the current user in the Approver box. However, if I change the Submitter to someone else, those filters do not seem affected, so it still shows the Approvers for the original person in the Submitter field, not the new one.
How can I get that to update? I am thinking something like Catalog Client Script, but are not sure how we would affect the filters on the variable from it (I have a feeling I may be overthinking this and overlooking something obvious here).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2019 12:19 PM