Update nested variable in action column

Hello Community :slight_smile:

I have a table in an App that includes a toggle action column, which on activation updates a variable with the “variablesToBeUpdated” functionality. This worked fine with the variable having just a single value. Now I wanted to change the variable to have two values and update both of them. So I changed the variable definition from

{
      "name": "selected_Variable",
      "type": "string",
      "default": "",
      "excludeFromURL": true
    },

to

{
      "name": "selected_Variable",
      "type": "string",
      "default": {
        "value1": "",
        "value2": ""
      },
      "excludeFromURL": true
    },

And the update from

"variablesToBeUpdated": [
              {
                "name": "selected_Variable",
                "valueFromColumn": "column1"
              }
            ]

to

"variablesToBeUpdated": [
              {
                "name": "selected_Variable.value1",
                "valueFromColumn": "column1"
              },
              {
                "name": "selected_Variable.value2",
                "valueFromColumn": "column2"
              }
            ]

But this does not work for some reason. I suspect it is because of the nested reference with the “.” because even doing the above changes with just a single value and referencing it like this does not work.

I know I could just create 2 different variables but I’m curious to whether this should work and if so, how?

3 Likes