How to configure Stringformatter item
This example explains how to add a Stringformatter item which is used to format a string based on external item(s) and a format-control string.
The variable type which support this functionality is the item type StringFormatter on the ApisWorker module.
Add worker module
Follow the guide Add Module to Apis Hive to add a module of type ApisWorker to an Apis Hive Instance.
- After adding the module, select the new module named "Worker" from the Solution Explorer.
- Set the "ExchangeRate" property to e.g. 1000 ms. This is the update rate when this module exchanges data with other modules.
- Click on Apply
Add items
- Follow the guide Add Items to a Module, but this time select item type "StringFormatter".
- Click "Add item(s)"
- Click Ok
Connect String Formatter item to source item
The StringFormatter will format the value on the input item according to the value in the FormatControlString property.
Connect external item
- Right Click on the StringFormatter item and select Connect
- Select the item which should be used as source item. In this case I will use an item called Worker.InputStringFormatter
- Click Connect and then Ok
Configure FormatControlString property
- Select the StringFormatter item to get the property view of the item
- Set the value of the FormatControlString to format item based on input value.
- Click Apply