if condition for lookup field

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
coresoul
Posts: 23
Joined: Tue Feb 24, 2015

16 Mar 2015

i did this and its not working. Please help

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

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

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

}

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

17 Mar 2015

Hi,

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

coresoul
Posts: 23
Joined: Tue Feb 24, 2015

17 Mar 2015

its in new form and its a lookup dropdown field

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

18 Mar 2015

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

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests