Skip to main content

Write

The following table provides information regarding the 'Write' SFCodeBlock.

Write SFCodeBlock

CategorySF Attributes
DescriptionThe Write Attribute code block allows you to change an attribute value using the value returned by the specified expression, as well as to
InputAF Element
ParametersNone
Pattern SupportYes
ReturnsNone
ConfigurationYou are required to configure at least a Write Attribute. Since the 'Write Attribute' supports multiple patterns, you can add as many Write Attributes as are required.

Add a Write Attribute
To add and configure a Write Attribute:
1. Click on the Add button.
Add Write SFCodeBlock

2. Enter your configuration values in the Add Write configuration panel.
3. Click Save.
4. Repeat steps 1 - 3 for each Write Attribute you need to add.

Edit a Write Attribute
To edit the parameters for a Write Attribute:
1. Click on the Write Attribute placeholder you need to edit.
Edit Write SFCodeBlock

2. Enter your changes in the Edit Write configuration panel.
3. Click Save.

Write Configuration Panel

The Write configuration panel allows you to configure different actions. Remember one action only can be configured per each Write Attribute code block.

Attribute tab
Use this tab to change the default value in the Sigmafine database for the selected attribute.

ItemRequired / OptionalDescription
AttributeRequiredName of the attribute in which to change the default value.
Attribute ValueRequiredExpression result in which the value is used to write the value in the attribute.
Unit of MeasureOptionalUnit of measure for the value returned by the expression.

If not specified, it is assumed that the value is based on the default Unit of Measure for the attribute.

Adjustment tab
Use this tab to create an adjustment in the selected attribute.

ItemRequired / OptionalDescription
AttributeRequiredName of the attribute in which to create the adjustment.
Attribute ValueRequiredExpression result in which the value is used to create the adjustment.
Unit of MeasureOptionalUnit of measure for the value returned by the expression.

If not specified, it is assumed that the value is based on the default Unit of Measure for the attribute.
CommentOptionalFree text for the adjustment's comment.

Clear Adjustment tab
Use this tab to clear the adjustment in the selected attribute.

ItemRequired / OptionalDescription
AttributeRequiredName of the attribute in which to clear the adjustment.
CommentOptionalFree text for the clear adjustment comment.

Result tab
Use this tab to reset the result stored in the attribute.

ItemRequired / OptionalDescription
AttributeRequiredName of the attribute in which to reset the result or the adjustment.
Remove InputOptionalIf selected, reset the input result recorded in the selected attribute.
Remove OutputOptionalIf selected, reset the output result recorded in the selected attribute.
Remove AdjustmentOptionalIf selected, clear the adjustment in the selected attribute.
CommentOptionalFree text for the clear result comment.
Note

You can select any combination of the above options to perform the required reset action. For example, the Remove Adjustment option is equivalent to the Clear Adjustent but, using this option in this context, allows you to reset the result as well in the selected attribute.

Example: Write Attribute

In this example, the analytic checks if there is a bad value on the i_meas_mass_close attribute and then it creates an adjustment using the value from the previous case.

Write Attribute - SFCodeBlockConfiguration Panel

Below is an example of the code from the above configuration.

Write Attribute - SFCodeBlock Code