Expand my Community achievements bar.

Form Calc If then statement help

Avatar

Level 1

I have a form that I am creating that has a dropdown menu (1-10 numbers) which I need to convert the selected number to a long text field on a different field.  The text fields are just too long to use on the dropdown menu.

if (dropdownlist=1) then

     (textfield1="some long text")

End if

What is the correct format for the formCalc script to use?  I am assuming that I can repeat the number to text conversion script.

Thanks

3 Replies

Avatar

Level 10

Hi,

The syntax would be:

if (dropdown eq "1") then

     textfield = "some long text"

elseif (dropdown eq "2") then

     textfield = "some other long text"

endif

This is on the basis that the dropdown items are just numbers, 1, 2, etc.

Hope that helps,

Niall

Avatar

Level 1

Thank you very much!  Once again the forum has saved my butt!

Later

Kevnaples

Avatar

Level 1

Choose(dropdown, "some long text", "some other long text")

...easier, nicer, faster.