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.
var db = context.application.getStorageContainer();
var scan = context.application.model.getObj("scan");
var inserts = [];
var newRow = {
      date_time                  : new Date() 
      ,session_id                : rowObject["session_id"]
      ,product_id                : rowObject["product_id"]
      ,scanner_id                : rowObject["scanner_id"]
      ,slaughter_sequence_no     : rowObject["slaughter_sequence_no"]
      ,weight                    : rowObject["weight"]
      ,is_vib                    : rowObject["is_vib"]
      ,processed                 : 0
      ,deleted                   : 0
     };
var insert = (function (insertRow){
    // add record    
    return db.insertBookmark(scan, TSFRowBookmark.fromObject(scan, insertRow), true);
})(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
