variable value is "undefined"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2016 01:16 AM
Hello,
I have a variable on a record producer named "dsn_name". At the moment, the type of the variable is wide single line text.
I also have another variable named caller_id which is a reference to sys_user table and it's mapped on the caller field. By default this value is populated with the ID of the person currently logged in the instance.
I'm trying to pull a value from the'caller_id"(distinguished_name) and populate it in the "dsn_name" field. My catalog client script looks like this:
function onChange(control, oldValue, newValue, isLoading) {
var poc = g_form.getReference('caller_id');
g_form.setValue("dsn_name", poc.distinguished_name);
}
I'm getting 'undefined' instead of showing the distinguished_name value.
Any ideas would be me appreciated !
Thanks
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2016 02:07 AM
Alex,
Would you mind sharing the complete screenshot of your catalog client script form.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2016 02:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2016 02:21 AM
not sure, why it's not working it but should be whenever the form is loading.
anyways one last thing to confirm, what type of variable is dsn_name ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2016 02:26 AM
dsn_name type is single line of text at the moment. I tried making it reference( to sys_user) and it didn't work. I tried multi line text, I tried wide line text..still nothing.
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2016 02:34 AM
Strange thing is : if I change g_form.setValue('dsn_name',poc.distinguished_name); to g_form.setValue('dsn_name',poc.phone); then it's working, it's showing the requester's phone number.
If I change to (dsn_name',poc.country) I'm getting NUL instead of the user's country. If I change to dsn_name',poc.location) I'm getting the sys_id of the location instead of the actual location.
Don't understand what is happening.
Alex