Select
The following table provides information regarding the 'Select' SFCodeBlock.
Select SFCodeBlock
| Category | SF Case |
|---|---|
| Description | Defines a new working space (i.e., the Element collection), by resolving the select expression. All subsequent SFCodeBlocks will receive as input, the new selected collection. Using the Select statement you are able to specify which elements should be processed. As an example, you should focus on meters only or on specific elements matching a condition, etc. If needed, a NULL Working Space can be selected. Please refer to the "SFHub Expressions Guide" for additional details. Please refer to the SigmafineHub Expressions topics for additional details. |
| Input | AF Case elements |
| Parameters | None |
| Pattern Support | None |
| Returns | Working Space |
| Configuration | You are required to enter at least one condition for the expression. Add a Select Expression To enter a condition: 1. Click the empty text box. Select - Add an Expression 2. Type the expression in the configuration panel that opens. 3. Click Save. Edit a Select Expression 1. Click on the expression placeholder to open its configuration panel. Select - Edit an Expression 2. Type your changes in the configuration panel. 3. Click Save. |
Select Configuration Panel
The Select configuration panel allows you to enter an expression for the select statement.
The following table describes the configuration options.
Select Configuration
| Item | Description |
|---|---|
| Expression | An expression containing a condition to be evaluated, to narrow the Working Space. If the expression is qualified by the string 'NULL', the original Working Space is emptied. Any element variable allocation raises an execution error like: Execution Error - Time: 06/09/2021 10:37:28 - Element <> Error<(E) Set of a variable<$localvar> not allowed with empty working space>This technique is used to perform some processing out of the original Working Space (e.g., initialize global variables, etc.). You can reestablish the Working Space using 'Select' in subsequent code blocks. If the expression is empty, the Working Space is initialized with all the elements. Please refer to the "SFHub Expressions Guide" for additional details. Please refer to the SigmafineHub Expressions topics for additional details. |
Example: Select SFCodeBlock
The following table contains several Select expressions and a description of what each returns.
| Expression | Description |
|---|---|
| NULL | It returns an empty Working Space. |
| Alky | It returns a Working Spacer containing all the AF Elements whose names contain the string 'Alky'. |
| "p_Alky" | It returns a Working Space containing the AF Element named "p_Alky". |
| "ObjectStatus"='OS' | It returns a Working Space containing the AF Elements having the attribute ObjectStatus = OS. |