- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2018 01:19 AM
when form is Loaded -if User name( value :User) is Empty then Devision field should be Readonly
var gd=g_form.getDisplayValue('User');
if(gd== " ")
{
g_form.setReadOnly('devision',true);
}
}
it is not working as per my expectation
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2018 01:21 AM
Try
var gd=g_form.getValue('User');
if(gd== "")
{
g_form.setReadOnly('devision',true);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2018 01:21 AM
Try
var gd=g_form.getValue('User');
if(gd== "")
{
g_form.setReadOnly('devision',true);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2018 01:25 AM
after form loaded it became read only, if i select value after form load , can i access Devision???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2018 01:29 AM
you'll either have to configure an onChange script to change make readonly false or save the form so it loads again and makes the field editable.
you can avoid this by using a UI policy, it will reverse if false dynamically as the form changes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2018 01:29 AM
Hi Karthikeya,
Please write the script on OnChange Client Script Field Name should be User Name
if((isLoading)||(newValue=='')){
return ";
}
var gd=g_form.getValue('User');
if(gd== "")
{
g_form.setReadOnly('devision',true);
}else{
g_form.setReadOnly('devision',false);
}
}
Please Mark Correct / Helpful If your query is resolved
Regards
Rajesh Kumar Annepaka