Conditional Drop Downs
Posted: 23 Apr 2019
Hello,
I've used the following conditions before in forms but for some reason it doesn't seem to be working anymore. The following code continues to give me a return of "OSI" no matter which selection I choose. Is there something you can see wrong with the conditional code below?
fd.field('ContractsCAGECode').control().change(function(){
var cagecode = fd.field('ContractsCAGECode').control().value();
if (fd.field('ContractsCAGECode').control().value() == '1VZN4')
{
fd.field('Entity').control().value("AI");
}
else if (fd.field('ContractsCAGECode').control().value() == '5UBL3')
{
fd.field('Entity').control().value("ATG");
}
else if (fd.field('ContractsCAGECode').control().value() == '59W37')
{
fd.field('Entity').control().value("Stratus");
}
else (fd.field('ContractsCAGECode').control().value() == '097A3')
{
fd.field('Entity').control().value("OSI");
}
});
I've used the following conditions before in forms but for some reason it doesn't seem to be working anymore. The following code continues to give me a return of "OSI" no matter which selection I choose. Is there something you can see wrong with the conditional code below?
fd.field('ContractsCAGECode').control().change(function(){
var cagecode = fd.field('ContractsCAGECode').control().value();
if (fd.field('ContractsCAGECode').control().value() == '1VZN4')
{
fd.field('Entity').control().value("AI");
}
else if (fd.field('ContractsCAGECode').control().value() == '5UBL3')
{
fd.field('Entity').control().value("ATG");
}
else if (fd.field('ContractsCAGECode').control().value() == '59W37')
{
fd.field('Entity').control().value("Stratus");
}
else (fd.field('ContractsCAGECode').control().value() == '097A3')
{
fd.field('Entity').control().value("OSI");
}
});