I am trying to insert data into a table. One of the values I would like to insert is a relation to another table.
I would like to use the row ID of the data in the other table, rather than using the display value. If I try something like this :
Hi @Florian_Lefebvre2 - Unfortunately not. At the moment the only option is to use the display value of the target row, which I understand is quite error prone. We are tracking this request internally, and Iāll bump it again.
+1
Please add support for this! Using the display value of the target row is unreliable because there can be multiple rows with the same display name and this often requires a separate API call just to fetch the display column of a row.
Fully agree that the ārealā row ID (e.g. āi-djr7ApmsBbā) , should be treated better by the API, including querying for rows by list of row IDs , using IDs to insert relations.
Using the display value is extremely brittle.
Thanks for raising this issue to our attention again. I agree with you that it would be better if we supported row IDs in more places, with relation column values being the most pressing need. We donāt currently have any plans in the works to fix this, but Iām chatting with the engineering team to discuss a path forward.
I see this is now supported with the upsert row endpoint in the latest API update (1.4.5) - this is awesome and thank you so much for reacting to feedback so fast!
Could you please take a look at the remaining two cases:
Multiple row references - I tried passing both a single string (e.g. āi-KBtx1k-pJJ, i-nfq2xcBF8zā) and an array of strings (e.g. [āi-KBtx1k-pJJā, āi-nfq2xcBF8zā]) as the cell value but neither work; the column has the Allow multiple selections option enabled
The update row endpoint still seems to not accept row id as cell values
Good eyes @Leon_Grdic, you beat me to it. Yes, this week we released support for passing row IDs in this upsertRows endpoint. Let me ask about the multiple row references, as Iām not sure what was intended there.
Yes, thatās what I understood as well. I checked with the engineering team and they hadnāt built in support for setting multiple references at once, but they are looking into that case to see if they can add support for it as well.
But not working on my end, itās simply inserting the ID itself and not the actual relation. Any idea why?
Also - Im in need of inserting multiple row references as well. . . @Eric_Koleda would love to see that addition to the API!
EDIT:
I figured it out - My relation column was not set to the correct table - but my need for inserting multiple values to a relation column via the uuid in the API still stands!