Hey,
I created this formula that allows me to control an output combining multiple columns, controlled by another table that sets which columns to show and in what order.
All good until here:
Now, I want to be able to add the name of an existing row that was not initially in my formula. Here’s the challenge: I want to replace the current formula listing each item with a formula that could count and check all rows on the ColumnOrder table, find/identify that column in my main table, and add its value.
In a nutshell, add and remove columns without editing the formula.
In the gif above, you can see what I want to do: I added a new row and put the name of the column to find. That’s it.
As far as I can tell, you already have the list of rows you want to pass to the Join() in your FormulaMap() object – so simply add Currentvalue.ColumnName in the FormulaMap and you should be good to go!
Nope, not possible. You cannot modify the formula itself dynamically.
The only context where this is possible with hacks is buttons — i.e. it’s possible to construct a button formula and convert it into an Action object that you can then set onto a button. But in a live recalculation scenario like yours, there’s no way to do this.
P.S. There is technically a way to add a column to your ColumnOrder table that would list all the values from the respective columns, and then concatenate that… but that’d be a massive performance problem. You could do it if your Table won’t grow past 100-ish rows, but after that it’s just not gonna be worth it.
Thanks, Paul. Yeah, that idea could work, but I will surely have issues with performance, as you said.
To be clear, I don’t want to update the formula dynamically. I’m looking for a way to find a column with the same name as my row value and retrieve its value.
If this is possible, in my specific case, it would identify the column ‘D’ and provide me with the value from that column in the OUTPUT column.
Apparently, it is not possible to find columns by name, right?
Yeah, there’s no such introspection capability. “Finding column by name” would either involve getting values through a pack (hence slow) or a ‘black magic’ button with that constructed formula.