Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Expand
titleTable Of Contents

Table of Contents
printablefalse

...

The CSV output facilitates publishing collected records to comma-separated values files.

Configuration

General Tab

...

  • Protocol and Publisher Mapped Fields . Combines both user defined and device fixed fields.(Default)
  • Publisher Mapped Fields Only. Allow for only user defined history items to output with custom column names.
  • Protocol Fields Only. Device fixed fields only.

Field Map

Field Map Data is where a Collection is entered. A collection provides a way to include additional fields in the output record, or to give existing fields a different column name.

Configure the Field Map Data by clicking Edit Collection... 

...

  1. Click Add to enter the appropriate number of New Record items 
  2. Click Remove to delete any unwanted New Record items 
  3. Click Tabular Display to view all New Record items at once 
  4. Select the appropriate New Record item 
  5. Click on Field Identifier. The name of the field as published by the protocol module. Select the identifier from the Selection form when the edit icon is selected.
  6. Click on Output Field. Enter the appropriate name or leave blank. 
  7. Click on Record ID and enter the appropriate name. 
  8. Click Close to leave dialog

...

Default = 60 (minutes). If "Other" is selected above, the publisher will use this value to publish only those records that have a matching period value.

Check all required record types to be published.

How To

Add an empty column to a published csv file

  • Create a String object in ACM or identify any existing String object that can be used as a column place-holder.
  • Use any desired option other than "Protocol Fields Only" for the Field Selection on the CSV tab.
  • Use the “Edit Collection” button to edit the custom field collection.
    • Click the “Add” button to add a new entry to the collection.
    • In the new entry that appears, open the Field Identifier selector (the “…” button) and choose the string object that was identified earlier. Note: If the CSV output object is publishing a record that already contains a value for the selected String object, the field's value will be used. To put an empty column into a csv file, the String object cannot be referenced by any device history records.
    • Type the desired name for the column in the “Output Field”.
    • Save and close the collection editor and save the CSV output object. The next time the CSV output object creates a new file to publish data, the file will contain the new column with an empty value for that column in every row.

Add a constant value to every row in a specific column in a published csv file

  • Create a String object in ACM or identify any existing String object that can be used as a column place-holder.
  • Use any desired option other than "Protocol Fields Only" for the Field Selection on the CSV tab.
  • Use the “Edit Collection” button to edit the custom field collection.
    • Click the “Add” button to add a new entry to the collection.
    • In the new entry that appears, open the Field Identifier selector (the “…” button) and choose the string object that was identified earlier.
    • Type the desired name for the column in the “Output Field”, enclosing the name in double quotes. Then add an equal sign, followed by the constant field value enclosed in double quotes. For example, to produce a column named “Color” that has the value “Red” in every row, the Output Field should look like this: “Color”=”Red”.
    • Save and close the collection editor and save the CSV output object. The next time the CSV output object creates a new file to publish data, the file will contain the new column with the constant value for that column in every row.

Use a field’s value as part of the file name in a published csv file

  • Use the token “$$FieldN$$ in the “File Name” box where the value should appear. Replace the “N” in “$$FieldN$$” with the one-based index number of the field whose value should be used.
  • Save the CSV output object. The next time the CSV output object creates a new file to publish data, it will find the field at index 'N' in the record and use that field's data to substitute for the token string in the file name.