Javascript: base.getRowById output problem

I’m using seatable cloud and I have a (wierd ?) problem with base.getRowById. I’m using it to retreive a linked record.

const order = base.context.currentRow;
const client = base.getRowById(“Clients”, order[‘Client’][0]);

But instead of retreiving a row with correct col names, I have instead a row with col keys:
{"_id":“crLxU19FTZ6mlt2ltwk5fw”,"_participants":[],"_creator":“xxxxxxxxxx”,"_ctime":“2021-04-09T16:57:25.379+00:00”,"_last_modifier":“xxxxxxxxxxxx”,"_mtime":“2021-04-10T16:04:58.953+00:00”,“DgpH”:“511403”,“0000”:“Nom client”,“En04”:“Prénom client”,“gmOj”:“1989-12-11”,“dXO8”:“06 54R97",“vwoh”:"”,“qOj7”:“xxxxxxxxxxxxxx”}

So I added a workaround to extract the real column names:
var client_new = {};
const columns = base.getColumns(‘Clients’);

client_new[col[“name”]] = client[col[“key”]];

And then it works. Should’nt this be the default behavior ?

Thanks, we will check the problem soon.

1 Like