From a button in table 1: create and activate a row in a table 2, and add a reference to that row in a column of table 1. If I’m working with only ONE reference: this works fine:
But the problem is that this completely overwrites the Associated Topics field even if there already exists a topic there. Since this is to be a many-to-many relationship, I’d prefer to append to the list rather than overwrite the field.
But in my testing, I’m not able to use the AddRow() action from within either a Concatenate() or ListCombine(). If I try to, the action doesn’t launch and simply returns what I believe is a reference to some Action object (Action ⚡). Wrapping the action in RunActions() also doesn’t seem to help.
I’m fairly “aways from keyboard” but how about storing the reference to the brand new created row within a simple text field (like it can be done when setting up a simple Add Row button and select the optional Results column in the menu) and then use that field to add the row to the multi-select lookup field ?
This is what I did in the sample you’ll find below using this Action formula :
So, the “1st” action modify the value in the text field [Added rows] to add the reference to the brand new row the button creates (and is opened at the same time).
And the 2nd action modify the lookup field to add the reference of the brand new row to the list rows already selected .
I was actually super close to having this solution but tried to do it in the form of a Text or Lookup control, both of which gave me the same problem where SetControlValue() caused the inner Action to be read as an object, rather than a function returning a reference.
One adjustment I made to your formula though is, rather than using an entire helper column, which is O(n) storage cost (one field per row), I created a helper “temp_var” table and set the values in there instead, which is O(1) storage cost (one field for ALL rows) and can be shared between tables who share this use case.
I can post the example when I’m home from work. I just use the current user as a key for the value to prevent situations where two people are trying to use buttons at the same time.
I wonder why the action executes in ModifyRows() but not SetControlValue().