Two conditions inside an IF function
Posted: 22 Apr 2017
Hi,
Im using the below script to hide / show a field:
I would also like the script to run if the following condition also is true:
How can I include two conditions inside the IF function?
Thanks in anticipation!
Vegard
Im using the below script to hide / show a field:
Code: Select all
if (fd.field('ContentType0').control('getSelectedText') == 'Complaint') {
$('div.fd_title').filter(function () { return $(this).text() === 'Root Cause (NCR/Complaint)' }).closest('tr').show();
$('div.fd_title').filter(function () { return $(this).text() === 'Basic Root Causes' }).closest('tr').hide();
}
else {
$('div.fd_title').filter(function () { return $(this).text() === 'Root Cause (NCR/Complaint)' }).closest('tr').hide();
$('div.fd_title').filter(function () { return $(this).text() === 'Basic Root Causes' }).closest('tr').show();
}
Code: Select all
if (fd.field('ContentType0').control('getSelectedText') == 'Non-confomance')
Thanks in anticipation!
Vegard