String
Using a simple drag-and-drop, place the "String " icon in the desired location in the " Properties " column. Alternatively, double-click the "String" icon.
This property type allows you to retrieve a portion of a property (unlike the " Concatenation" type).
For example, retrieve the first 3 characters, etc...
You can also start the search at the beginning or end of the property value, and specify the number of characters to retrieve or the character to search for.
Let's take the case of the " Ref" property that needs to be filled in:
If the value of the " Supplier " property is equal to " DMS-PowerFull- ", in the " Retrieve the first n characters " field.
- " Extract the first n characters ":
- By checking " From the beginning" and specifying 3,this indicates that the first 3 characters will be retrieved.
This makes " Ref " equal to " DMS."
- By checking " From the end" and specifying 5,this indicates that the last 5 characters will be retrieved.
This makes " Ref " equal to " Full- ".
- Checking " Between the 5th and the 10th " indicates that the string between the 5th and 10th characters will be retrieved.
This makes " Ref " equal to " Power."
- " Retrieve the first n characters, starting from the beginning of the search ":
Another example: in a Windows path, if you want to extract characters based on the position of the " / " character.
"310/SmartProperties/310-122-Lid"
- By checking "at the beginning ":
By checking " from the beginning " and specifying the character "/ ", this indicates that all characters from the beginning up to the first " / " character will be retrieved.
This sets " Ref " to " 310 " (corresponding to the project number, for example).
- By checking " at the end ":
By checking " at the end " and specifying the character "/ ", this indicates that all characters from the end up to the first " / " character will be retrieved.
This results in " Ref " being equal to " SmartProperties/310-122-Couvercle."
- By checking " Split ":
This is a special case that allows properties entered using a specific syntax to be processed. For example, if the “Supplier” property lists three available suppliers from three different countries, a separator character (such as “:” ) is used to separate the values.
"Supplier" = Visiativ Switzerland:Visiativ:Aliativ
This makes " Ref " equal to " Visiativ."
- "Retrieve the characters starting from n":
If the value of the "Supplier" property is equal to: " 300-PowerFull-1000 "
- If you check " at the beginning ":
The value retrieved from the beginning of the string up to the " - " character, which gives " Ref " equal to " 300 ".
- By checking " at the end ":
The value retrieved from the end of the string up to the " - " character, which results in " Ref " being equal to " 1000 ".
If you want to retrieve the value between the " - " characters, use the previous option by checking " Split."
- "Replace":
You can also replace characters in an existing property value: For example, replace the character " - " with a space.