- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2019 08:19 AM
Hello Everyone!
I am trying to use dotwalking to set default values for several catalog variables. Somehow it sometimes works the way I do it and sometimes it does not.
This way it worked for the Requester and the email address. The other values are still empty (although they are not empty in sys_user table)
In some cases (with some users) I get at least a sys_id in the location field. So I changed the variable type
the result is more or less the same with the difference that I get a valid location for some users now.
The following screenshot shows the form from the view of 2 different users (both have all fields filled in sys_user table). You can see that sometimes at least some fields are filled, but still not all of them.
I hope someone can show me what I am missing.
btw I tried to user gs.getUser().getLocation() (didnt work out) and gs.getUser().getRecord().getValue(‘phone’); (didnt work out either)
BR
Sascha
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2019 01:55 AM
You mean for some users the gs.getUser().getRecord().getValue('department'); is working for few it is not. Have you checked the permissions of the fields?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2019 08:33 AM
Hi Sascha,
Use methods given in below link.
Mark If Correct/Helpful.
Regards,
Ajay

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2019 08:55 AM
I don't see any thing wrong the below scripts. Are the values exist for location and phone field on sys_user table?
gs.getUser().getLocation() (didnt work out) and
gs.getUser().getRecord().getValue(‘phone’);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2019 04:12 AM
well i can see the syntax not given correctly.
For example
gs.getUser().getEmail() instead of gs.getUser().email

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2019 12:21 AM
Hello,
I would suggest to use a client script which doesn't involve gs in the catalog item form. Please remove the default values in the variables try to use below code and check once . Try to create onChange clinet script on Requester
g_form.getReference('requester', function(gr) {
g_form.setValue('email', gr.email);
g_form.setValue('company',gr.company);
}
});
If this is also not returning the desired output, using GlideAjax and call back function will be the right option
Regards,
Jagadeesh