- 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:22 AM
Try this
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:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2018 01:44 AM
You can also try this.
var gd=g_form.getDisplayValue('User');
if(!gd)
g_form.setReadOnly('devision',true);
---------------------
In your code
var gd=g_form.getDisplayValue('User');
if(gd== " ") // you used white space for validating Nan Values
{
g_form.setReadOnly('devision',true);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2018 01:55 AM
Hi Karthikeya,
You can achieve this by simply using UI Policy
use the condition: user name is empty
Thank you,
vishu