Expand my Community achievements bar.

Syntax for If statement

Avatar

Former Community Member

I am trying to develop my first form using FormCalc. Line 1 reads:

"if (OfferPrice.rawValue < 300000) then InitialDeposit.rawValue = 5000 elseif (OfferPrice.rawValue > 299999) then InitialDeposit.rawValue = 10000;" (without the quotes)

It won't work and I am told the error is at various places each time I check the syntax. Help - If I can't do something this simple I think I will shoot myself. The names are correct and I have this under "calculate". And to think, I used to program in APL and Cobol

2 Replies

Avatar

Former Community Member

You didn't end your if statement..if shoudl be like this:

if (OfferPrice.rawValue < 300) then
InitialDeposit.rawValue = 5000
elseif
(OfferPrice.rawValue > 299) then
  InitialDeposit.rawValue = 10000
endif

Avatar

Former Community Member

Thank you.

I guess that is what happens when you decide to try and use skills you developed 35 years ago on an IBM 370 in CMS and went on to higher paid things 5 years later or maybe it is that I am 70 and my mind wanders.

Peter Luttmer

“Ever stop to think and then forget to start again?”

You didn't end your if statement..if shoudl be like this:

if (OfferPrice.rawValue < 300) then

InitialDeposit.rawValue = 5000

elseif

(OfferPrice.rawValue > 299) then

InitialDeposit.rawValue = 10000

endif