- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2016 10:37 AM
Hi all,
I am looking for some help on referencing a value from another table to this catalog item. The screenshot below shows an example of me wanting to auto-populate the Billing ID of the company when the company name is filled. I have done this with ease on Call/Incident/Request forms but I have had no luck on a catalog item. Is there an easy way to do this or does this require a client script?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2016 11:58 AM
Hi,
You need to create a on change client script to populated the related field value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2016 11:58 AM
Hi,
You need to create a on change client script to populated the related field value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2016 12:09 PM
Thanks. I figured it would have to go that route. Is it an on change client script against the catalog item or the variable set? What would the script look like?
The company field would be filled out with the company name (core_company.name) and the billing ID is also in the same table (core_company.billing_id).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2016 12:20 PM
You can create it on either catalog item or variable set.
code looks like below:
function onChange(control, oldValue, newValue, isLoading) {
Obj = g_form.getReference('company',setInfo);
}
function setInfo(Obj){
g_form.setValue('billing_id', Obj.billing_id);
}
Use the correct variable names in the code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2016 01:12 PM
Thank you very much! I got it working as intended.