Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

Save Array to Storage and Get Array Value from Storage

I have a mapping from a service to a label in a list. For each list item, I want to look at a separate collection filtered by the id of each list item and sum that "sub-list"

Here is the mapping:

Image

And here is the code on that mapping:

var token = Apperyio.storage.user_session_token.get();
var jli = value._id;
var sum = 0;
var mins = 0;

var whereObject = {job_lineitem_ptr: {"$inQuery": {_id: jli } } };

var onSuccess = function(data){
Apperyio.storage.time_logs.set(data);
console.log(Apperyio.storage.time_logs.get());
console.log(Apperyio.storage.storageVariable.get("$['time_logs']['minutes']"));
};

view_lineitems_actual_hours_calc.execute({
headers: { "X-Appery-Database-Id": "DATABASE STRING" , "X-Appery-Session-Token": token } ,
data: {"where": JSON.stringify(whereObject)} ,
success: onSuccess
});

for (var i=0; iImage

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

Save Array to Storage and Get Array Value from Storage

After taking a step back and approaching this issue from another direction, I have modified my code. As such, this title is not really accurate anymore. I have created a new post regarding the issue here:

https://getsatisfaction.com/apperyio/...

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

Save Array to Storage and Get Array Value from Storage

Answered in the topic above

Return to “Issues”