Page 1 of 1

if condition for lookup field

Posted: 16 Mar 2015
by coresoul
i did this and its not working. Please help

if(fd.field('AFHJobStatus').value()=='Part-Time')){

$('.noofhrs').show();

fd.field('NoOfHour').titleRequired(true);

}

Re: if condition for lookup field

Posted: 17 Mar 2015
by Dmitry Kozlov
Hi,

Please, specify the type of field 'AFHJobStatus'. Is it new, edit, or display form?

Re: if condition for lookup field

Posted: 17 Mar 2015
by coresoul
its in new form and its a lookup dropdown field

Re: if condition for lookup field

Posted: 18 Mar 2015
by Dmitry Kozlov
You should check for equality by ID of the lookup column or use the following code to get a display value:

Code: Select all

fd.field('Lookup').control('getSelectedText');
http://spform.com/forms-designer- ... eld-values