populate current user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2023 02:06 AM
Hi All,
I have a requirement where I have created multiple variables - RequestedFor, MobileNumber, Email, Preffered contact method,Type of Request ,role etc
1.user opens the form above details auto populate with logged in user
2.on change of user, above details to be changed auto change based on the user change
- Current logged in user value should be default in Requested for variable.
- Email and phone numbers should be auto populate from user table based on the values selected in ‘Requested for’ variable.
- Preferred Contact Method default value should be IM
Please help me to achieve this requirement
Thanks&Regards,
Raja
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2023 06:27 AM
Hi,
You can follow below steps to auto populate the Requested For details with logged in User.
- Navigate and open the variable which you need to auto-populate
- In the variable declaration there is a tab labeled 'Default Value'
- Set the default value to javascript:gs.getUserID();
- Save the record.
Also to populate the user details you need to write a onchange client script and pull the details from the requested For.
Hope this Helps..!!!
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2023 06:45 AM
Hi rajachodisetti,
In your field that is a reference of sys_user table, add as a default value 'javascript: gs.getUserID()'. This will get the current user, then the other variables can be auto-populated from dictionary definition as follows:
With this the value will be automatically updated without any scripting.
For contact media field use the same as first one, default value 'string_value' and will be automatically selected.
☆ Community Rising Star 22, 23 & 24 ☆