oOnClick will bring listbox data to you at the click of a button.  You can easily view your data in customer defined datasets sorted out by just the columns you are interested in.  Afterward, feel free to download your data to a spreadsheet or simply email it to yourself or others.

 

The sample provided in this help document provides a listbox with Active Part Records.  This listbox displays a several additional columns including the Part Unique ID, Part Type/Name, Quantity, Data Entry Test Date Value, and Data Entry Test Result Value.

Configuration

Create a new Data Report Object.  Following this, you can now choose the different configuration options for your oOnClick Data Report.

  • Data Report Name: Name Value Viewing
    • Provide a name for this Report Object
  • Data Report Number: DR14-000000001
    • You can autogenerate the Report Number or type in your own manually.
  • Revision: A
    • Provide the revision value for this Data Report
  • Description: This report will open a listbox that contains filtered Parts and Data Entry Values
    • Optional: Describe what this Data Report is doing.
  • Report Type: oOnClick
    • select which type of Report Type you will be using.
  • Report Defaults: false
    • This pulls values from 
  • JSON Input Object: Download Sample JSON oOnClick Data
    • This JSON input value tells the oOnClick function what data to display, filter, columns, etc.  It is best to read the JSON Input Object explanation later in this help page.

 

JSON Input Object Explanation

You can download the sample JSON described below, formatting may differ.  Every JSON Input Object will always contain the following objects:

  • f
  • a1
  • o
  • arCheckVals
  • arColm

Only the values within these JSON objects should change according to your configuration.

Line 4: "f":"fEZHash", This is the EZ-MES Function that handles the switch for the "a1" attribute.

Line 6: "a1":"vPRActLst", Current options for this are "vPRActLst" (active parts) and "vPRLst" (all parts).

Line 8:  "a2":{,  This object contains listbox properties, FlowName, arCheckVals, and arColm.

Line 9:  "x":100,"y":100,"w":900,"h":600,"id":"PR_Custom","sTitle":"Name Value View",  Provides values for the Listbox Window. 

  • x = upperleft window draw point x coordinate
  • y = upperleft window draw point y coordinate
  • w = window width
  • h = window height
  • id = html id of window, should be unique
  • sTitle = Name Displayed on the window

Line 11:  "o":{"sFlowName":"PR_Flow"}, Since we are making a listbox of Part Records, this will always be the "PR_Flow".

Line 13:  "arCheckVals":[ , arCheckVals is an array of check vals.  They are they query parameters for which data will be pulled from the "PR_Flow"

Line 14-24:  Each _EZQueryItem introduces a new parameter to filter the query.  

  • Line 14 = sVal says give me all items that of of the sPDType Part
  • Line 17 = sVal says give me parts with a sPRVP value of PD14-000000001 - Rev:A (Widget)
  • Line 20 = sVal says also give me parts with a sPRVP value of PD14-000000002 - Rev:A (Gadget)
  • Line 23 = sVal says make sure the sPRNV_test_date value is not empty.  see the sOperation.

Line 13:  "arColm":[, arColm is an array of columns that are going to be in the listbox.  Our example has five colums.

  • sTitle = the column label
  • iW = Column width
  • bHyperLink = Makes value display as a hyperlink
  • sDbNm = EZ-MES internal attribute name
  • sTxtAlgn = Aligns the text within the column.  left, center, or right
  • iType = Displays data based on the value type.
    • 3 -  string
    • 4 - date
    • 4.2 - Time elapsed
    • 6 - numerical
  • Line 27 = {"sTitle":"UID","iW":130,"bHyperLink":true,"sDbNm":"sPRUniqueID","sTxtAlgn":"center"},
  • Line 29 = {"sTitle":"Part Type","iW":130,"bHyperLink":true,"sDbNm":"sPRVP","sTxtAlgn":"center"},
  • Line 31 = {"sTitle":"Quantity","iW":130,"iType":6,"sDbNm":"sPRQty","sTxtAlgn":"center"},
  • Line 33 = {"sTitle":"Test Date","iW":130,"iType":4,"sID":"TestDate","sDbNm":"sPRNV_test_date"},
  • Line 35 = {"sTitle":"Test Result","iW":130,"iType":6,"sID":"TestResult","sDbNm":"sPRNV_test_result"}

 

 

oOnClick JSON Sample

Download Sample JSON oOnClick Data

 

Executing the Data Report Object

There are a number of ways to perform the Data Report Execution of the Data Report Object.