Expand my Community achievements bar.

And if statements

Avatar

Former Community Member
Are we able to do "and, if" statements in adobe?



i.e.



if field1.rawValue>10 and field2.rawValue<350 than this.rawValue == "10"

else

if field2.rawValue>10 and Field2.rawValue<350 than this.rawValue =="20"

so on and so forth?



I've tried all the limited scripting I knowa and cannot get this to work
1 Reply

Avatar

Former Community Member
In JavaScipt:



if (field1.rawValue > 10 && field2.rawValue) {

this.rawValue = 10;

{ else if (field2.rawValue < 10 && Field2.rawValue < 350) {

this.rawValue = 20;

}



In FormCalc:



if (field1.rawValue > 10 & field2.rawValue) then

$.rawValue = 10

elseif (field2.rawValue < 10 & Field2.rawValue < 350) {

$.rawValue = 20

endif



Chris

Adobe Enterprise Developer Support