Yeah, thank you Katya, but I was constantly getting errors using:
prerequest.object().groupTypeID;/pre
So I ended up changing the POST to GET, and it worked fine
Yeah, thank you Katya, but I was constantly getting errors using:
prerequest.object().groupTypeID;/pre
So I ended up changing the POST to GET, and it worked fine
Addy,
Glad to hear you solved it
Hi there, it must very simple too but very new with server code. like your lights pls.
1/ there are several queries one after the other,
2/ the record (object) of what is the criteria doesn't always exist,
the result is when the object cannot be found, the rest of the script is not processed.
as you can see on the trace, it runs query0 but when the result of the query1 comes up "empty" then it stops.
here after is my code, may I ask you what extra instruction I shld insert to handle the error thrown as the query1 comes out empty ?
// QUERY 1 to retrieve the userNotes
var param1 = {}; //Define parameters object
param1.criteria = { //Query criteria:
$and:[{"userName": userName},{"countryID":countryIdfull}]
};
var query1 = Collection.query(DB_id, collBknotUserNotes, param1);
console.log("param1 = ");
console.log(JSON.stringify(param1));
console.log("query1 = ");
console.log(JSON.stringify(query1));
var countryId = query1[0][colmCountryID];
console.log("countryId ="+countryId);
var bknoteUserNotes = query1[0][colmUserNotes];
console.log("bknoteUserNotes ="+bknoteUserNotes);
thk you very much in advance
Best
Eric
In fact, I could manage to handle the empty result and get the response as expected. Happy !
hv a good week. Eric
Hello Eric,
Thank you for the update! Have a good week too
Hi! I'm getting the error "": ApperyioAPI: Empty objects can't be created. Please specify at least one field.
I tried what was said above and couldn't understand the part where I must create function for users?
Please reply asap and thank you!!
Also there is no data tab in the latest appery io today so how can i add a data source such as a service? Thanks again!
Hello Samantha,
Could you please provide us with more details, screenshots or exact steps to reproduce this problem?