Maximum value in field based on dropdown menu selection in another field
hi,
i trying set maximum value in field based on selection drop down menu in field. in other words, there 3 selections in drop down menu (0-2, 2-10, , 10+). if select 0-2 maximum amount allowed in field 10. if select 2-10 maximum amount 15 , if enter 10+ maximum amount 22. message box appear , state amount of maximum vacation .... if amount in field exceeds maximum value.
if amount in field2 exceeds maximum value should reduced maximum amount based on selection drop down menu.
field1 dropdown menu field
field2 field maximum value based on dropdown menu selection (by way, field2 automatically calculated 2 different fields people not able manually input it)
this script have far , not working. not sure if javascript or formcalc better. adding script field2 maximum amount rule applies. in advance assistance!
if (filed1.rawvalue eq "0-2") , if (field2.rawvalue>10)
xfa.host.messagebox("maximum vacation time 10");
this.rawvalue = 10;}
elseif (field1.rawvalue eq "2-10") , if (field2.rawvalue>15)
xfa.host.messagebox("maximum vacation time 15");
field2.rawvalue = 15;
elseif (topmostsubform.page1.p[0].dropdownlist1.rawvalue eq "10+") , if (field2.rawvalue>22)
xfa.host.messagebox("maximum vacation time 22");
field2.rawvalue = 22;
endif
More discussions in LiveCycle Designer
adobe
Comments
Post a Comment