
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2017 12:30 AM
I'm having some issues wrapping my brain around an issue that I've been really banging my head against for the last few days. I am a scripting novice, I am able to read examples most of the time and build out something that works, but for the Service Catalog I am just not getting it and all the examples that I've found here and other places on the internet are just not clicking in my brain apparently.
Basically the issue that I'm having is that I need to filter reference field lists on a Record Producer form in the catalog based on the value of another field on the form. I have a Company field that has the name of a company out of 4 possible choices. If a particular company is selected, I need values that have the same value in the Company field on those tables displayed. I am using the following tables:
- core_company - This is used as the dependent value on my forms with 4 possible values (e.g. Microsoft, Apple, HP, Google) in the "u_company_name" field.
- cmn_cost_center - This is used with the field on my form "u_location_code". Location code choices are determined by the dependent value in "u_company_name" and where "u_cost_center_type" = "Location" on the cmn_cost_center table.
- cmn_cost_center - This is used with the field on my form "u_department_code". Department code choices are determined by dependent value in "u_company_name" and where "u_cost_center_type" = "Department" on the cmn_cost_center table.
- itfm_gl_accounts - This is used with the field on my form "u_account_code". Account code choices are determined by the dependent value in "u_company_name".
The problem that I'm seeing of course in the Service Catalog is that the reference fields are displaying all possible choices, and while I've looked at scripts and tried a few modified to what I thought I needed, nothing works, and everything looks like a wall of text to me now . Below is a screenshot example of what I'm seeing (happening on Location code, Department code and Account code fields).
The challenge is that the companies that we are setting up for this share similar account structures and account codes, as we are all related and use a single Finance department. On the itfm_gl_accounts table I am differentiating the account codes/accounts by the company they are related to, and want to filter the reference fields the same way so that when we start reporting on stats we are showing the correct GL account(s).
Again, this all works well and configuration was relatively simple for the request forms (we're running this on the sn_sm_finance_request table), but the service catalog has different quirks.
Any help is greatly appreciated, as I've spent several days trying to solve this on my own and am a bit behind on implementing this feature. Thanks!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2017 10:38 AM
I found an example in a similar post and modified the script a bit. Turned out that I just needed to use javascript: in the advanced reference qualifier field on the variable. No need for a script include.
javascript: 'u_cost_center_type=location^u_company='+current.variables.CompanyName.toString();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2018 08:17 PM
Hi Marcel,
I have a similar requirement..
I have to make user_name reference field in catalog(Directs to sys_user table) dependent on company_name reference field (core_company)...
Can you please provide me the code for it?