Expand my Community achievements bar.

How do I use switch and case statements to fill more than one other field?


Level 3

Hi all,

I'm new to the community.

I'm trying to make an existing form more user friendly for my coworkers. I want to use a switch and case approach in a drop-down list field so that the selection fills two seperate other fields with different info related to the selection.

I can already do this with one field, but if I add a second target field under an existing case the text doesn't appear there when I make the selection from the dropdown.

Basically, I'm asking if I can do this:




   case "1": // Selection 1


= "text for field 1";

    Row1.Field2 = "text for field 2";



It works if the "row1.field2" option isn't there, but not when it is present.

Any takers?

4 Replies


Level 3

The formatting got messed up when posting. Pretend that it looks normal.

I attached an rtf file that gives you the basic idea.


Level 6


Actually it sholud work. maybe there is some problem on the form. If you post it i'll have a look.


Paul Butenko


Level 3

I'm not sure if I will be able to send you the form. There may be too much to redact.

Would this last bit of code in the cell affect anything?





= "open"; // enable field


= "0,0,0"; // set caption to black


That is, do I also need to repeat the same thing for the second target cell (Row1.Field2)?

What would be possible hang ups that would prevent it from working correctly?


By the way, I'm not sure if my other attachment posted. I am trying again.


Level 3

I was able to get it to work. For whatever reason, I had to add one more level in the description to get the second field to populate automatically.

So, I could say

  case "1":

    Row2.Column2 = "First text"

    Section1.Row1.Column3 = "Score value I want to display" // this was the part where I had to add Section1. Not sure why the first line didn't matter.


Thanks for taking a look.