Hi,
I am trying to hide a signature field if the value of another calculated field is less than a certain value. I am attempting to use:
if (TotalRelUpper.rawValue<150) then
signature.presence="invisible"
endif
If I put this formcalc statement in the click section of the calculated field, the signature field presence will change state, but I want it to automatically change state based on the calculated value.
Ideas appreciated.
Thanks!
Srini,
Thanks for the info. When I place the following code in the calculate section, the calculation does not work. The signature field is invisible and no value will make it visible.
Thanks,
Stan
form1.#subform[0].TotalRelUpper::calculate - (FormCalc, client)
TotalRelUpper.rawValue=UpperNFC.rawValue+UpperExp.rawValue if (TotalRelUpper.rawValue<150) then VPsignature.presence="invisible" endif
Srini,
Even with the else statement, the code does not work in the calculate section.
form1.#subform[0].TotalRelUpper::calculate - (FormCalc, client)
TotalRelUpper.rawValue=UpperNFC.rawValue+UpperExp.rawValue
if (TotalRelUpper.rawValue>150)then
VPsignature.presence="visible"
else
VPsignature.presence="invisible"
endif
The calculated field is read only and is the sum of two other fields filled in by the user. I want to have a signature field appear or disappear based on the value in the calculated field.
Thanks,
Stan
Hi Stan,
You just need to make sure the last expression evaluated to the calculate event it the one you want in the result, so you can do;
TotalRelUpper.rawValue=UpperNFC.rawValue+UpperExp.rawValue
if (TotalRelUpper.rawValue>150)then
VPsignature.presence="visible"
else
VPsignature.presence="invisible"
endif
TotalRelUpper.rawValue
The last line can set there like that, or you could do;
var total=UpperNFC.rawValue+UpperExp.rawValue
if (total>150)then
VPsignature.presence="visible"
else
VPsignature.presence="invisible"
endif
TotalRelUpper.rawValue=total
Regards
Bruce
North America
Europe, Middle East and Africa
Asia Pacific