Advanced Logic/Javascript on a matrix field

I have a matrix field with 3 rows and 4 columns. I’d like to run some custom logic (via Javascript) on that field, but unsure how to do so.

I usually use the Rule Builder to give me some direction (and see what JS code it writes), but that tool is only allowing me to select from [“is filled”; “is empty”].

Would love some example JS code that details, for example, if for Row2 the user selected Option/Column 3.

Thx

Hi Kris, I have added a logic rule Matrix Example in the Stock Comp Assessment form as a reference - you would first need to obtain the question id for each of the rows (already included in the code comments), and use that to check if a certain option is selected with includes().

Please let us know if this works for what you would like to achieve. Thank you.

1 Like