I will check if an element with a certain id (which I named "setid") exists. If not create it and set the id. Unfortunately this doesn't work. Where is the error?
Thanks in advance. Alex
var resultSet;
var setId = "setid";
if(paper.getById(setId) != null) {
resultSet = paper.getById(setId);
resultSet.clear();
resultSet = paper.set();
resultSet.id =setId;
}
else {
resultSet = paper.set();
resultSet.id = setId;
}