Hi,
I am creating scanner functionality for the mobile GUI which also must be available offline. I have the possibility to insert a new scan
Example of my insert.
1var db = context.application.getStorageContainer();2var scan = context.application.model.getObj("scan");3var inserts = [];4var newRow = {5 date_time : new Date() 6 ,session_id : rowObject["session_id"]7 ,product_id : rowObject["product_id"]8 ,scanner_id : rowObject["scanner_id"]9 ,slaughter_sequence_no : rowObject["slaughter_sequence_no"]10 ,weight : rowObject["weight"]11 ,is_vib : rowObject["is_vib"]12 ,processed : 013 ,deleted : 014 };1516var insert = (function (insertRow){17 // add record 18 return db.insertBookmark(scan, TSFRowBookmark.fromObject(scan, insertRow), true);19})(newRow);This works great.
What I now need is the possibility to do a select from the scan table. (a count where session_id = @session_id). How can I achieve that?
Kind regards,
Peter

