Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Dynamic table row drop down list to change another drop down list in the same table

wei_yewt8829972
Level 1
Level 1

Hello all,

I have the following created where the table will have two drop down list.

The first problem category will be having, lets say x,y and z.

Next problem code depends on problem category that when x selected then it will create list of x1,x2,x3 or y selected then populate y1,y2,y3

1487677_pastedImage_0.png

I have the above mentioned created without any problem.

However, I am also having add row. So when come to second rows, the above function will not work anymore as it is different row objects.

What can I do to resolve this?

Thank you!

1 Accepted Solution
_Bruce_Robertson
Correct answer by
Level 10
Level 10

Hi,

This should be simple enough, what code are you using?

I would try something like this JavaScript in the preOpen event of the "Problem Code" field.

switch (Category.rawValue) {

case "X":

  this.setItems("X1,X2,X3");

  break;

case "Y":

  this.setItems("Y1,Y2,Y3");

  break;

case "Z":

  this.setItems("Z1,Z2,Z3");

  break;

}

Just change the "Category.rawValue" to match whatever you have called your field.

Regards

Bruce

View solution in original post

1 Reply
_Bruce_Robertson
Correct answer by
Level 10
Level 10

Hi,

This should be simple enough, what code are you using?

I would try something like this JavaScript in the preOpen event of the "Problem Code" field.

switch (Category.rawValue) {

case "X":

  this.setItems("X1,X2,X3");

  break;

case "Y":

  this.setItems("Y1,Y2,Y3");

  break;

case "Z":

  this.setItems("Z1,Z2,Z3");

  break;

}

Just change the "Category.rawValue" to match whatever you have called your field.

Regards

Bruce

View solution in original post