Bad Addy
Posts: 0
Joined: Fri Dec 13, 2013 9:34 pm

Using $in Server Code Multi Update issue

I am trying to update some rows based on a criteria, where the first 4 chars change.

Here is the code:

precode

phone = "+440654332123&quot

phone = phone.substr(4,phone.length);

Collection.multiUpdateObject("55be4ab5dbe", "messages", JSON.stringify({
'message_phone': {"$in": phone}
}), null, {
$set: {
'message_status': 'C'
}
});
/code/pre

It is throwing an error in the trace, but not saying where. Can you not use $in, in this way ?

This is pretty urgent, if someone can back to me.

Bad Addy
Posts: 0
Joined: Fri Dec 13, 2013 9:34 pm

Using $in Server Code Multi Update issue

21 Hours and still waiting support, not giving me confidence in returning to Appery!

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Using $in Server Code Multi Update issue

Hello,

It is allowed to use $in parameter only for arrays variables, but you use it for the string.

Return to “Issues”