- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2018 08:11 AM
I think it should be like,
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue == '') {
return;
}
var employee = g_form.getReference('u_emp_name', setemployeedetails );
function setemployeedetails(employee) {
alert(employee);
g_form.setValue('u_emp_id', employee.user_name);
g_form.setValue('u_emp_bg', employee.u_segment);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2018 08:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2018 08:24 AM
I think, that's fine, what you get with there alerts?
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue == '') {
return;
}
var employee = g_form.getReference('u_emp_name', setemployeedetails );
function setemployeedetails(employee) {
alert(employee.user_name);
alert(employee.u_segment);
g_form.setValue('u_emp_id', employee.user_name);
g_form.setValue('u_emp_bg', employee.u_segment);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2018 08:29 AM
yes shishir, it is alerting the correct value now but not setting the values in fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2018 08:33 AM
is u_emp_id and u_emp_bg are reference field? Can you please provide some screenshot?