I am trying to setup some code that will look at a value in one field, and based on the result it finds determine what translated. I can get this to work when I have a single entry (for example "AB"), but when I try to expand this with an OR statement I no longer can get it work. It seems to just take the first entry, and stop there. I have tried different variations, and I have not been able to get it to go. I also tried to options with Formcalc. Does anyone happen to know what is incorrect in the syntax. If you have another suggestion with Formcalc I am OK with that as well.
if ( $record.PAGE.FIELD.value == "AB" || "CD" || "EF" || "GH" || "IJ")
{
this.rawValue = (data.PRINTLANG.rawValue == "EN") ? "Product" : "Produkt";
}else{
this.rawValue = (data.PRINTLANG.rawValue == "EN") ? "Service" : "Dienstleistung";
}
Thanks,
Andrew