Hi,
I have a number of columns in my Google Sheet where the heading is ‘Day 1’, ‘Day 2’, ‘Day 3’, etc. When my workflow is called, I receive a value for example ‘1’ which means that I need to update the column where the heading is called ‘Day 1’.
Is there an elegant way to do this other than putting if statements in every one of the columns of the update row node? I was considering something like this:
{{ Number($json.headerNumber) === 2 ? $cellValue : null }}
Not elegant and it has the side effect of nulling existing values in the other cells. I want the cell to remain intact and not be overwritten.
{{ Number($json.headerNumber) === 2 ? $cellValue : $json.cellvalue[‘Day 2”]}}
This works but it’s qite unmanageable with a large number of columns. I have 30 so it’s not that bad but if there is a more elegant way.…
Thanks,
L

