- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 01:04 AM - edited 11-22-2023 01:04 AM
Hello.
Im making a catalog item, that is gonna be used to look up users in a reference field. Then when you select a user his/hers information will auto populate the fields in the catalog item.
Variable set A, that's where the user basic information gets collected, Here i select the name and the users ID, status gets auto inserted into fields.
Then i have Variable set B. Here i have "account expire date", where i want the users account expire date to be auto filled in. The only issue, i need to get variable set B to notice when variable set A gets changed, how do i do this?
This are my current catalog client scripts:
Variable set A
Variable set B
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 03:31 AM
Please check the backend field name of your field 'account expires' from reference table configuration.
I believe it is u_account_expired.
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 01:44 AM
Hi,
I would suggest you to create a client script on Catalog form.
The script should run On Change of Variable "varA_name" from setA.
and your script would be like:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var userref = g_form.getReference('varA_name', userLookup);
function userLookup(userref) {
g_form.setValue('varA_employeid', userref.user_name);
g_form.setValue('varB_accountexp, userref.account_expires);
}
}
Just to correct your current script inVariable set B:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var userref = g_form.getReference('varA_name', userLookup); // it should be getReference, it was getValue before
function userLookup(userref) {
g_form.setValue('varB_accountexp, userref.account_expires);
}
}
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 01:48 AM
Oh ok so the first script you shared should be a client script in the main form and not variable setA, if im understanding it correctly?
Thanks for the quick respons and help

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 01:51 AM
Yes, single script on main form will serve the purpose.
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 03:17 AM - edited 11-22-2023 03:18 AM
The variable names look different cause i changed them in the post to make it more understandable in english. I only have 1 script now and its this one thats in the main catalogitem. Here is how the script now in the main form looks: