How to auto populate field values automatically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2023 02:30 AM - edited 01-12-2023 02:31 AM
Hi everyone,
I created two variables in the portal say requestor name and Requestor Email.
I want the requestor name field to be auto populated while raising a ticket and depending on the requestor name field it should pull the populate the same requestor email address to the next Requestor Email (Field).
Please provide your solutions
thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2023 02:55 AM
Hello @poornima batchu ,
For populating the requester name. you can write the onload catalog client script on that catalog item.
Use g_form.setValue('Variablename',g_user.userID);
and to populate the email id on requester email field.
unction onChange(control, oldValue, newValue, isLoading, isTemplate) { if (isLoading || newValue === '') { return; } //Type appropriate comment here, and begin script below var user = g_form.getreference('requested_for', function(user) {// map the correct field g_form.setValue('u_email', user.email.toString());// map the correct field }); }
if you dont want to write and populate please check the below link