In addition to managing property expressions, iPropWiz enables you to define a Property Extraction Rule for a text type property. The rule defines the property value to extract from, and the logic to extract a continuous set of characters from the value. You access the Property Extraction dialog from the Property Expression Editor dialog. A Property Extraction Rule can only be defined from the iPropWiz Configuration Editor ( CE ), the option is not displayed when the Property Expression Editor is accessed from the iPropWiz Property Editor or from the List Editor.
Access: Property Expression Editor dialog
Open Property Extraction Rule dialog |
|
Click this to open the Property Extraction dialog. If a valid Property Extraction rule is returned from the dialog, any Property Expression is removed. |
Remove Property Extraction Rule |
|
If the property is driven by a Property Extraction Rule, click this to delete the rule. |
Property Extraction Rule Editor
You use the Property Extraction Rule Editor to create or edit the extraction rule assigned to a property. In the Property Extraction dialog, select the property that will be the source of the extraction from the list at the top of the dialog. The list contains all text type properties included in the current property set of the active iPropWiz configuration. For example, all of the text type properties in the Part property set.
Extract from property |
|
Select the text type property whose value will be used as the source for the extraction rule. The drop down list contains all text type properties in the active iPropWiz property set, other than the recipient of the extraction. |
White space cleanup option |
|
Check this check box to remove and leading and/or trailing spaces from the extracted text. |
Extraction rule type |
|
Select the type of rule from the Extraction rule type drop down list. See the Extraction Rules section below for examples of each rule type.
|
Rule definition |
|
On selection of a rule type, you are prompted to define the rule by selecting and entering values specific to the rule type. See the Extraction Rules section below for examples of each rule type. |
Test extraction rule |
|
You can test the extraction rule against the supplied text, or enter your own test value to check the rule against. See the Extraction Rules section below for examples of each rule type. |
Refresh test result |
|
Click to apply the current rule against the text in the Extract from value text box. The result is displayed in the Result box. |
Extraction Rules
You can select from five rule types. Rules define start and end locations for the extraction, based either on number of characters, or the location of specific set of characters. You can choose to include the characters used to define the start and end locations, and can also select a specific occurrence (1st to 10th) of the set of characters used to define the start or end of the extracted text. Each rule is explained with an example in the following table.
A number of characters from the start or end of a property value |
Example:
|
Notes: Select either First n characters or Last n characters and enter the number of characters. The result of the extraction rule ( Last 7 characters ) on the test value is displayed when you refresh the test. The space characters in the test value are valid characters in the count.
|
Start at nth character, include a number of characters |
Examples:
|
Notes: Specify the location of the first character to extract, and the length of the extracted string. For the first example extracted string is only four (4) characters long. Because "Remove leading and trailing spaces in result" is ON, the original five (5) character long extracted string "st : " is shortened to "st :" For the second example, entering zero (0) for the number of characters to extract changes the rule to extract all characters from the start character to the end of the value.
|
Start at nth occurrence of a string, include a number of characters |
Examples:
|
Notes: In both examples above, the start position ( 3rd occurrence of " - " ), and number of characters (5) are the same. In both examples an enhanced version of the occurrence string is displayed in red text, below the text box. Since spaces are difficult to manage, the enhanced version of the occurrence text ( "_- _") displays underscore characters in place of spaces. The example on the left has the Include Occurrence check box checked. The the extracted text starts at the first character of the found occurrence. The example on the right has the Include Occurrence check box unchecked. The extracted text starts at the character following the found occurrence. Both examples return extracted text that is four (4) characters long due to trimming of leading (left example), and trailing (right example) spaces.
|
Start at nth character, end at the nth following occurrence of a string |
Examples:
|
Notes: In the example on the left, the extraction starts at the seventh character in the test value, and ends at the second occurrence of the string "2", not including the end occurrence. In the example on the right, setting the occurrence count to zero (0) changes the search to the last occurrence of the string "2". The end occurrence is included in this example..
|
Start at nth occurrence of a string, end at the nth following occurrence of a string |
Example:
|
Notes: Specify start and end strings and occurrences of each. All fields are completely independent. Rule settings and options on occurrences are the same as in other rules. In the above example, all text (including the start and end occurrences) between the first two occurrences of the string "3" is extracted.
|
General Extraction Rule Notes:
When entering the number of characters, you can enter values from 1 to 999.
When entering a string to find, the string can be any number of characters, and can include space characters.. (e.g. "a", "abc", " - ", "Part") Note: Do not include the quote characters { " } in you string specification.
When specifying the nth occurrence of a string, you can enter values from 1 to 10.
Check the Include Occurrence check box to include the string occurrence (at the beginning and/or end of the extraction) in the extracted text.
Occurrences of a string are counted from the position of the start character, not from the beginning of the property value.
If you set the end at occurrence count to zero (0), the last occurrence of the string is used.
|
Copyright © 2024 C-Cubed Technologies Ltd.