- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2020 12:07 AM
Hi Team,
Would like to create the OnLoad Catalog Client Script that when the user is loading the form, it will auto populate / fill up some user details in the form, how do I start ??
Thank you!!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2020 01:45 AM
Hi Jason
Basically you want to populate the requested for as soon as the form loads
If yes there are 2 ways
1.Default Value :You can use it by modifying the variable default value
2. In onload client script use
g_form.setValue('requested_for',g_user.userID);
Regards
Pranav

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2020 01:45 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2020 05:19 AM
Hi
Hope you are doing good.
Is this question resolved or you need some more assistance?
If your query is resolved then please mark the correct response so that this thread can be closed.
Regards
Pranav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2020 10:53 PM
Hi Pranav,
Thanks for your advice, the options 2 helped!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2020 11:20 PM
Hi there ,
As pranav has given you two ways to populate the user details according to the user reference field you can try those they are correct .
or
if you want to set the current logged in user details in those variables then you can also set the default value of the variable.
eg.
gs.getUser()
gs.getUser().getFirstName()
gs.getUser().getLastName()
gs.getUser().getEmail()
gs.getUser().getLocation()
gs.getUser().getDepartmentID()
gs.getUser().getManagerID()
just set these in the variable's default value it will get the current logged in user deatils.
If my reply helps you at all, I’d really appreciate it if you click the Helpful button and if my reply is the answer you were looking for, it would be awesome if you could click both the Helpful and Accepted Solution buttons!
Regards,
Apeksha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2023 11:42 PM
Hello @Apeksha Joshi , I am not able to get the user details even after setting the variable's default value.
can you help me out?