- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2023 06:01 AM
Hi Team
i created a catalog item (Device req) & created Requested for filed as (username).
hear my requirement is, once i selected the username . email id will fill automatically in Email field.(email back end value is "email")
pls guide me how to achieve these through catalog client script
Thanks in advance 🧡🧡
Regards
khasim.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2023 08:01 AM
Use this
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var ref = g_form.getReference('user_name', req_for);
}
function req_for(ref) {
g_form.setValue('email', ref.email);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2023 07:36 AM
Hi Anurag bhai
Based on your code, i have created my own code but it is not working, pls guide me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2023 07:41 AM - edited ‎11-07-2023 07:42 AM
Hi Khasim,
This is not what I gave, what are the name of the two variables?
The one that has user and the one you want to populate email?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2023 07:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2023 08:01 AM
Use this
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var ref = g_form.getReference('user_name', req_for);
}
function req_for(ref) {
g_form.setValue('email', ref.email);
}
}