plugin.runQuery

The 'runQuery' function runs a query with the given search criteria. The query results can be returned or simply listed out wihtin a query result window in the main program. The return value consists of query results in plain text lines form separated with linefeed '\n', each item takes a line in form of 'sDbPath \t sSsgPath \t sSsgName' separated with the TAB character '\t'.

  • Prototype: platform.runQuery({

    • iDbPos: -1,
    • sFindStr: '',
    • sLabels: '',
    • bSubLabels: false,
    • tCalendarStart: new Date(),
    • tCalendarEnd: new Date(),
    • tModifyStart: new Date(),
    • tModifyEnd: new Date(),
    • bListOut: false

    });

  • Parameters: an object containing,

    1. iDbPos: a position number (0-based) of the database on the tab control; -1 for the current database.
    2. sFindStr: text to find;
    3. sLabels: labels to match; semicolon separated multiple labels allowed;
    4. bSubLabels: specifies if or not to look into sub labels;
    5. tCalendarStart: start date to match item's calendar attributes;
    6. tCalendarEnd: end date to match item's calendar attributes;
    7. tModifyStart: start date to match item's last modified date;
    8. tModifyEnd: end date to match item's last modified date;
    9. bListOut: true for query results to be listed instead of being returned, otherwise, query results are returned without being listed in the window;
  • Return Value: text lines of query results.
  • Example:
    alert(plugin.runQuery( {iDbPos: -1, sFindStr: 'text to find', bListOut: true} );