Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

If then statement - hiding the 0 field and calculation! HELP!

Avatar

Level 2

Ok, I am trying to have the CAP RATE: do a couple of things. First side note, in the Lien Postion drop down there are 4 options, 1st Fixed, 2nd Fixed, 1st HELOC and 2nd HELOC. I am trying to calculate the CAP RATE using the APOR if the Lien Position states 1st Fixed or 2nd Fixed only. So the calculation for CAP RATE should read something like this, IF (Lien Position states: 1st Fixed or 2nd Fixed  then ADD  (IF 1st Fixed ADD 1.5% IF 2nd Fixed ADD 3.5%) to the APOR rate (Users will enter APOR rate).

EXAMPLE:

Lien Position: 1st Fixed

APOR: 3.48%

(becasue it is 1st Fixed)

+ 1.5%

CAPP RATE= 4.98%

EXAMPLE 2:

Lien Position: 2nd Fixed

APOR: 3.48%

(becasue it is 2nd Fixed)

+ 3.5%

CAPP RATE= 6.98%

Also, I want the CAP RATE to be CLEAR or BLANK if there is no APOR rate entered because it is for FIXED RATE ONLY.

Capture.JPG

Any help is greatly appreciated!!!!!

1 Accepted Solution

Avatar

Correct answer by
Level 10

Ok,

this can be easily done with a FormCalc script in the calculate event of the cap rate field.

Assuming the other fields are named LienPostion and APOR, the script looks like:

if (LienPosition eq "1st Fixed") then

          APOR + 1.5

elseif (LienPosition eq "2nd Fixed") then

          APOR + 3.5

else

          APOR

endif

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Ok,

this can be easily done with a FormCalc script in the calculate event of the cap rate field.

Assuming the other fields are named LienPostion and APOR, the script looks like:

if (LienPosition eq "1st Fixed") then

          APOR + 1.5

elseif (LienPosition eq "2nd Fixed") then

          APOR + 3.5

else

          APOR

endif

Avatar

Level 2

That is actually perfect! The only thing I changed was that if it wasn't one of those two it would be blank.

Like this:

if (lienpos eq "1st Fixed") then
          apor + 1.5
elseif (lienpos eq "2nd Fixed") then
          apor + 3.5
else
          ""

endif

Thanks so much for your help!