Hi everyone,
I have a table connected to a database and I am trying to get the item _id from the database when I select a row. I want to use the ids from the items on the table to automatically reference them in another database when a row is selected.
This code gives me an item id from the table’s items, but for some reason the ids are not representing the correct item. For example when I select the first row it gives me the id for the second row item. It seem like my indexes get mixed up at some point? I would really appreciate any help!
export function reqTable_rowSelect(event) {
//Add your code for this event here:
let scope = $w.at(event.context.itemId);
let item = scope(‘#dataset2’).getCurrentItem();
let itemId = item._id;
console.log(itemId);
}