How to get the _id of a row just created in Python

I have a few cases where I want to link a row that I just created through a Python script.
Currently I use a hacky SQL-Query to retrieve the ID, which is less than ideal.

In my forum search I found that base.append_row() apparently returns an object. Being quite the newbie, I cannot figure out from the documentation how to access said object. Can anyone point me in the right direction?

Hi @dandroprock
It is as simple as :

new_row = base.append_row('myTable', row_data)
print(new_row['_id'])

Bests,
Benjamin

1 Like

That does the trick. Thank you, @bennhatton!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.