I am checking my database to see if the record exists if it does not exist I run a create service. I am using the following code to
1) get a group of messages from twilio
2) create a local array
3) loop through the array and take action
sms_to_local_To.execute();
var items = Apperyio.storage.messageDBData.get();
for (var i = 0; i < items.length; i++)
{
var currItem = items;
Apperyio.storage.messageDB.set(currItem);
Check_Message_ID.execute();
}
the problem I am having is that the query service goes though all the array but only takes action on the first record. when I use this look to just copy the array directly to the database it works for each record and records them, but for some reason it won't step through the loop one at a time. The mapping on the where is based on the local variable currItem.