auto populate one field based on other 3 fields
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 03:33 AM
Hello Exports,
We want to auto populate based on assigned to field on asset table.
cost center ,department and location.
Requirment
1.If assigned to is empty "cost center ,department and location" fields should be empty.
2.If not should populate values based on the assigned to .
I have tried below onchange client script but not working pls correct me.
Table =" alm_asset"
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if (newValue == '') {
g_form.clearValue('department');
g_form.clearValue('cost_center');
g_form.clearValue('location');
return;
}
var ven = g_form.getReference('assigned_to', _AssetData);
function _AssetData(ven) {
g_form.setValue('department', ven.department);
g_form.setValue('cost_center', ven.cost_center);
g_form.setValue('location', ven.location);
}
}
10 REPLIES 10
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 12:36 AM