Hello everyone,
Thank you very much for your responses. It works!
I think there was an issue with the permissions, I revoked all of them and permitted again and it worked :) I'm doing this with the PC version.
Thank you for all your answers and the new code you proposed. It really helped.
I had an additional question. Would it be possible to specify that instead of "id" being the Last Entry on the library, it is the Last Entry the user wrote in the library? We are working several people in the same project, but I don't know enough Java to know if this option exists or not.
In my imaginary code it would be like:
let id = idLib.lastEntry(author=="me");
Does something like this exist?
The structure of the Libraries are:
"ID" library for the characteristics of sites. with fields like: "City" "coordinates" "Temperature"
"Obs" for the sampling. Fields are "species" "time" "abundance" "id"
As I don't want to risk that two people are doing the sampling at the same time and it links one ID with the wrong Obs entry, that's why I am asking if this option of specifying one's last entry would be possible. Each user only has permission to read, write and delete their own entries.
Thank you very much for everything!
María