- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2023 01:33 AM
Hello.
I have a variable set with name(refrence field to user), ID (singel line text).
and a catalog script that gets the ID of the selected. I copied this since i was asked to. And just added a new tittle and now the catalog script is not working, what may the issue be? I have tried everything i can.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2023 01:57 AM
Not the script type. You need to select another variable name onChange of which this client script is running and then revert that back . Reason being system stores sys_id of the variable and its still storing the sys_id of the variable that is part of the old variable set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2023 01:46 AM
Not sure if this helps to figure it out:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2023 01:41 AM - edited 11-10-2023 01:41 AM
Script looks fine,
Can you run this and show what you get in the alerts
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
alert(g_form.getValue('name');
var userref = g_form.getReference('name', userLookup);
function userLookup(userref) {
alert(userref.user_name);
g_form.setValue('id', userref.user_name);
}
}