R12.1-JA-2025June05

Convert Data Between Intent and ADT

NI can write data to ADT, and ADT can also be referenced as a table in NI. NI supports the data of object type and list type, which involves how to convert and map these data between intent and ADT. There are some universal rules to convert data between intent and ADT.

Data Types Supported in ADT and Intent

The supported data types in ADT and intent are as follows.

Data TypeColumn Type in ADTVariable Type in Intent
StringYY
BoolYY
FloatYY
IntYY
TimeYN
DeviceYY
Device ListYY
Device InterfaceYY
Device Interface ListYY
MapYY
IntentYN
PathYY
SiteYY
Device GroupYY
Primary Probe YN
SecondaryYN
DatasetYN
FileNY
ListNY
List ObjectNY
TableNY

Use ADT in Intent

All the data types are supported except for intent, primary probe, secondary probe, and dataset.

If the referenced columns are in the type of object, device list, or interface list, their data type will be displayed as string. You need to loop the ADT first, and then use the ‘set variable’ to store the data in the local variable with the corresponding type before it can be used.

Information

Note:

  • For the ADT data in the type of device list and interface list, it will be used as list of device/interface in NI.
  • For the data in the type of device, interface, map, path, site, and device group, it is used as object.
  • You cannot use the column variable of object/list type directly during looping table, and must use the ‘set variable’ to set the column variable to a local variable to use.
  • Operate on Table about ADT

    You can overwrite and append columns with specific variables when updating rows in the Operate on Table logic.

    The ADT column needs to be used as a match condition for the ‘Delete Row’ and ‘Update Row’ actions. The operators in condition are unified as follows:

    Column TypeNumberStringTime (ADT Only)Bool
    Global Table/Local Table/ADT Operator
    • Equals
    • Does not equal
    • Less than
    • Greater than
    • Less than or equal
    • Greater than or equal
    • Equals
    • Does not equal
    • Contains
    • Does not contain
    • Larger than <Time string variable>
    • Less than <Time string variable>

    Time string variable, can be get by function: GetTimeString(int offset, int timeunit=0/1/2(min/hour/day) )

    • Is  <True, False>
    • Equals <bool variable>
    • Does not equal <bool variable>

    The values of the ADT columns need to be updated for the ‘Delete Row’ and ‘ Update Row’ actions. The table lists how to pass the value of the intent variable to the ADT column.

    Data Type (ADT Column)Value Assignment from Intent
    String
    • The string cannot be directly used for value assignment, but the system provides a general function: ListtoMultilineText(), which can merge all items in the list into multi-line text before assigning values.
    • String, int, bool, float, time, and $this_device can all be used to assign values ​​to the ADT string.
    Bool

    The agreed format:

    • True, False
    • 0: False; non-zero: True
    • null
    Float

    The agreed format:

    • Float, int
    • If the string is converted successfully, it can be used for value assignment; or it cannot be used.
    Int

    The agreed format:

    • Float, int
    • If the string is converted successfully, it can be used for value assignment; or it cannot be used.
    TimeAccording to the time zone in the worker server, convert the time string to UTC for value assignment.
    DeviceDevice object can be used for value assignment. The values ​​of other types of variables are processed as strings. If the string conforms to the agreed format, it can also be processed as a device.
    Device List
    • Cannot use device object for value assignment. Users need to create a list device object and improve it with ‘Operate on List’ logic, and then assign values for device list in ADT.
    • Can use list device object for value assignment.
    • Can use list string for value assignment. If the string conforms to the agreed format, it can also be processed as a device.
    • Can use string for value assignment.
    Device InterfaceDevice object can be used for value assignment. The values ​​of other types of variables are processed as strings. If the string conforms to the agreed format, it can also be processed as a device.
    Device Interface List
    • Cannot use device object for value assignment. Users need to create a list device object and improve it with ‘Operate on List’ logic, and then assign values for device list in ADT.
    • Can use list device object for value assignment.
    • Can use list string for value assignment. If the string conforms to the agreed format, it can also be processed as a device.
    • Can use string for value assignment.
    MapOnly support map object for value assignment.
    PathOnly support path object variable for value assignment.
    SiteOnly support site object variable for value assignment.
    Device GroupOnly support Device Group variable for value assignment.


    Expression and Variable List

    An ADT may include columns in the type of object and list. You can use such type of columns in intent with following rules.

    • Object column and list column can be used directly when loop ADT.
    • If you need to use a specific value of the device list column of an ADT, the system always assigns the corresponding value of the object column and list column to a global variable or local variable when looping the table, and then uses it as a global variable or local variable.