Set one column's option values based on the value of another column in the same row of the table

Goal: I am trying to dynamically set the options for a Tag column based on present value of another column, for the same row, in the same table. I am able to achieve it, but in doing so, this seems to mess up the other "Tag" type columns within the table.

STEPS

  1. Create a table with two columns, "Conductor Type" and "Conductor Material" both of type: tag.
  2. Set the options to manual for Conductor Type; add "Non-Flexible Conduit" and "Flexible Conduit" as options
  3. Set the options to mapped for Conductor Material;
{{ JSON.parse(currentRow.fedby_details_json).type == "Non-Flex Conduit" ? ["PVC", "EMT", "IMC", "RMC"] : JSON.parse(currentRow.fedby_details_json).type == "Flexible Conduit" ? ["Flex", "Smurf", "SealTight"] : [] }}

Oddly, this works perfectly fine.. until I run the app in a live setting. Then, all of the tags fall apart... the tags for which the value differs from the label revert to the value (in screnshots, the "Normal" and "Emergency" reverting to "1" and "2") and the tag options disappear.

In build mode:

Live:
Screenshot 2025-04-01 at 1.55.34 PM

What if you approached it from the opposite end.

Manually define all options, then disable them based on the value of the other column?

From what I can see, I can’t access {{ currentRow }} or {{ i }} from within the manual option’s hidden property. But maybe I am missing something?

It's possible. Let me see...

SelectedRow was the way to go.

But couldn't use self. but had to use the table name explicitly

image
image

1 Like