- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2018 11:12 AM
I have a list collector variable on the sys_user table in a catalog item and I want to update the filter on the collector based on a selection of a drop down on the catalog item. I can do this as a catalog client script but I am having trouble setting the encoded query.
I want to encode 2 things
- show only users whose manager is the current user (i.e. requestor).
- The requestor chooses expires in 30, 60, or 90 days from a drop down list. I need to show users that have u_expires date field less than 30/60/90 days from now.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-13-2018 01:29 PM
OK, actually, we should be able to accomplish this without a Client Script:
1. set the Reference qualifier for the List Collector to the following:
javascript:"active=true^u_user_type=Consultant^manager=" + gs.getUserID() + "^u_expiresRELATIVELT@dayofweek@ahead@" + current.variables.number_of_days;
2. set the "Variable attributes" field for the List Collector to the following:
ref_qual_elements=number_of_days
The "ref_qual_elements" attribute will send back to the server the current values for those variables so they can be used in the reference qualifier.
Replace "number_of_days" in both the Reference qualifier and the "Variable attributes" field with whatever your variable name is.
I tried it in my dev instance with "Company" and "Users" variables and the Users list collector changes based on the selected company. In both the regular and portal UIs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2020 05:02 AM
Hi Jim,
Can you please tell me what should I do if need to get only users who belong to the company of the currently logged in user.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2020 06:39 AM
Did you ever figure this out?