- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2016 11:02 AM
I have a request form that needs to auto populate 4 variables based on the user that opened the request. The 4 fields are Project owner name, title, department and phone. These are all fields that exist in the sys_user table. I read through several discussions and found different variations on how to accomplish this, some of them with catalog client scripts but so far I have been unsuccessful with these suggestions. Bhavesh Jain did suggested in a post to use javascript:gs.getUser().getFullName() in the default value field for name and that worked perfectly, but I'm unable to figure out how to get this to work for the other three fields. Any help is appreciated.
Thanks,
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2016 09:11 PM
Hi Chad,
I've attached a simple script include and client script that should do the job for you. You will need to update the catalog client script to the right Catalog Item.
Check the field variable names, but I think you'll find it's all there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2016 12:11 PM
Thanks Chuck and Pradeep! I'm new to scripting so I'll take a look at your respective links and see what I come up with. I have a feeling I'll be responding with questions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2016 12:20 PM
The another way to pull this information out is using default value of variable with expression like,
Javascript: gs.getUser().getRecord().getValue('fieldNameGoesHere');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2016 12:24 PM
Hi Deepak,
That was the solution that Pradeep linked to. I have have concerns about performance with that one because it causes 1-2 server calls per variable! A GlideAjax would get it done with one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2016 12:26 PM
Agree with you TechNow master

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2016 12:27 PM
The other thing I just thought about with this approach is that it's static (a default value). If they change the user field, it's not updating the other fields.