The general syntax to query EZ-MES consitst of 4 main attributes with several sub attributes:

[S_arJSColm]

JSON representing the Output Columns

  1. sTyp = Is the Data Type for the return parses the data into ....
    • string
    • number
    • date
    • datetime
    • jobname

      Jobname is a string representations for the object for a Flow it would be the Flow Number + Flow Name + Flow Rev, for a Part Part Number+ Part Rev .....

  2. sNm = is the Data Base Name

    See Link For Examples Part Definition Data Diagram

  3. sTitle = Is the title for the output column
  4. oHash = Is a HashTable used to perform a Key to Val search.
  5. arJbConv = Is a array of Attributes to get to another object

    For Example, sFRFD links to the FD object so if you pass in "arJbConv:['sFRFD']" then the Name will be "sNm" will be pulling data from the FD not the FR

Notes:

The first set of characters for example "sFRFD" the "sFR" means it is on the FR Object or Table, if you look at the data diagrams almost all attributes will start with sFR on the FR Object, the exceptions are (These are available on all objects)

  • CurrentStatus
  • Initiator
  • DateTimeCreated

[S_o]

Is the Main Part of the Query, this only gives to what table or Object set to query.

  1. sFlowName

    Is what Object to query

  2. sJobFirst and sValNext

    Are used for Link List Queries

  3. Flows,
    • FR_Flow = Travelers
    • PR_Flow = Parts
    • NVR_Flow = Data for Parts

      sNVRPR is the connection to the Part

    • PD_Flow
    • ..... Many More

[S_arCheckVals]

Is the Filters or Where Clauses, this is a Array of the Object defined next, also JSON notation

Syntax (This is almost the same as the Column Syntax Above)

  1. _EZQueryItem:true

    Should always be true if using this syntax

  2. [sNm] is the DataBase Name
  3. [sTyp] is the Data Type
  4. [sVal] is what the actual filter data value
  5. [sOperation] is the Operation to Perform

    Supported Operations Include

    • [==] Equals
    • [!=] Not Equal
    • [>] Greater Than
    • [>=] Greater than or Equal
    • [<] Less Than
    • [<=] Less Than or Equal
    • [contains] if the string contains any part of the string
    • [!contains] is the string dose not contain part of the string
    • [regex] Equal To regular expression
    • [!regex] Not equal to regular expression
  6. [bAnd] = is a Boolean stating if it is a AND operation (Cannot be true if bOr is true)
  7. [bOr] = is a Boolean stating if it si a OR operation (Cannot be true if bAnd is true)
  8. [bCase] sets if it is Case Sensitive False is default
  9. [arJbConv] is the same as the column defined above it converts the object so you can access attributes of linked objects See Above

Example

  1. [{"_EZQueryItem":true,"sNm":"sPRPartType","sTyp":"string","sOperation":"!=","sVal":"Consumed","bAnd":true,"bOr":false,"bCase":false,"arJbConv":[]},{"_EZQueryItem":true,"sNm":"sPRFRProcessState","sTyp":"string","sOperation":"contains","sVal":"DONE","bAnd":true,"bOr":false,"bCase":false,"arJbConv":[]}]
  2. Conatins 2 Objects
    • First Checks the Parts sPRPartType dose not equal "Consumed"
    • Second checks that the sPRFRProcessState Contains "DONE"

[S_oSort]

Is the Sort Operation and it is performed after the data has been filtered

Syntax:

  1. [sSort]
    • [SortA] Sort Ascending
    • [SortD] Sort Descending
  2. [sTyp] = Same as Above String, Number .......
  3. [sNm] = Name of Attribute Same as Above
  4. [arJbConv] =Same as Above

NOTES

We recommend the following

  • Get a text editor this is all standard JSON notation
  • Everything is set up with defaults so it is not required to pass in all the arguments each time.
  • You can pass in null for the check vals and just get all the data for a Object pretty easy
  • The arCheckVals are performed in Order so the order of these can affect the speed.
  • Date Attributes will support Partial Date Strings for example > "Mar 2009" would work