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:
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; i