- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2022 11:11 AM
We have our system set up with our company as an Operating company and then different client companies.
On pretty much all the catalog items we have a variable to ask the "Requested For" which has the default value of javascript: gs.getUserID();
I want to restrict the table so that the requested for does not include the operating company (which I have done on the "Type Specifications" tab.)
However when a member of the operating company logs in, although you can not pull down members from the operating company in the drop down, the requested for is still populated with the current logged in user.
Any ideas what I could enter in the default value for this to do "if company is not operating company - get user id, else leave blank"
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2022 12:56 PM
Oops, it should have been
javascript:if( gs.getUser().getCompanyID() != "COMPANY_RECORDS_SYS_ID" ) { gs.getUserID(); }

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2022 11:28 AM
You could do something like
javascript:if(gs.getCompanyID() != "COMPANY_RECORDS_SYS_ID") { gs.getUserID(); }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2022 12:39 PM
Thanks, I have just tried that - its blank for me (being the operator company) but when i impersonate a client user it is also blank.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2022 12:56 PM
Oops, it should have been
javascript:if( gs.getUser().getCompanyID() != "COMPANY_RECORDS_SYS_ID" ) { gs.getUserID(); }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2022 01:09 PM
Thanks, that still doesnt work. I tried it the opposite way too (so changed it to equalling the system id of the company of the person i am impersonating) - and still didnt bring the person back.