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

Avatar

Avatar

wei_yewt8829972

Avatar

wei_yewt8829972

wei_yewt8829972

14-05-2018

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!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

_Bruce_Robertson

MVP

Total Posts

1.8K

Likes

268

Correct Answer

372

Avatar

_Bruce_Robertson

MVP

Total Posts

1.8K

Likes

268

Correct Answer

372
_Bruce_Robertson
MVP

15-05-2018

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

Answers (0)