The Property Type Convertor Operator creates a new property from an existing property by modifying the type of the existing property.
In a plan, some calculations use numerical data which are included in string properties. The Property Type Convertor Operator allows you to convert a string property into a number property.
The table below shows the authorized and unauthorized conversions:
|
Source property type |
Target property type |
Comment |
|
String |
String |
Authorized |
|
String |
Date |
Authorized |
|
String |
Number |
Authorized |
|
String |
Multi-valued string |
Authorized |
|
String |
Multi-valued number |
Authorized |
|
Date |
String |
Authorized |
|
Date |
Number |
Authorized |
|
Date |
Date |
Not authorized |
|
Number |
String |
Authorized |
|
Number |
Date |
Not authorized |
|
Number |
Number |
Not authorized |
|
Multi-valued string |
Multi-valued string |
Authorized |
|
Multi-valued string |
String |
Authorized |
|
Multi-valued string |
Multi-valued number |
Authorized |
|
Multi-valued number |
String |
Authorized |
|
Multi-valued number |
Multi-valued string |
Authorized |
|
Multi-valued number |
Multi-valued number |
Not authorized |
An operator uses a translation table providing a discount percentage from the number of units that are consumed by customers. The “number of units consumed” property is numerical. Using the Property Type Convertor Operator, you can convert this property into string before putting it into the translation table.
Name: Type the name of the component (mandatory).
Description: Allows you to type the description of the component (optional).
Source
Property Name: Provides the list of the properties. Select a property that you want to convert.
Property Type: Displays the type of the selected property. "Undefined" is the default value.
Target
Property Name: Allows you to type the property name that retrieves the result of the conversion.
Property Type: Provides the list of conversion types. The available types vary according to the source property type. Select one of the following conversion types:
String: Represents a character string. For example, "image", "text" and "price" are strings.
Number: Represents a decimal or an integer number. For example, 25.60, 6523 and 4.55 are numbers.
Date: Represents a combination of the day, the month, the year and the time. For example, August 12, 2008 12:00:00 AM is a date.
Multi-valued String: Represents a list of string values. For example, the multi-valued string ImageType contains the following list: image/jpeg:5000, image/gif:10000, image/eps:25000 and image/pic:8000.
Multi-valued Number: Represents a list of numerical values. For example, the multi-valued number ImageSize contains the following list: 5000, 10000, 15000, 20000.
This tab is separated in four areas. Each area corresponds to a type of property, but only one or two areas are available according to the conversion type that you select on the Definition tab. For example, if you want to convert a string into a string, only the String Parameters area is available.
String Parameters: Specifies the positions of start and end of a character substring in an input character string or a multi-valued string.
Start Offset: Select Start of String as the start of the substring, or select Numerical Value to specify a start position in the string or the multi-valued string, and then type the value.
Stop Offset: Select End of String as the end of the substring, or select Numerical Value to specify an end position in the string or the multi-valued string, and then type the value.
Date Parameters: Specifies the date format that allows you to convert a string into a date, or specifies the date field that allows you to convert a date either into a number or into a string.
Date Format: Allows you to type or select a date format. The date format conventions are the following: The character 'm' stands for month, 'd' for day and 'y' for year. For example, the date format 'm d y' represents dates such as 06 02 2001 or 26 05 2003. A lower-case letter represents numbers, and an upper-case letter represents letters. For example, the date format 'D d M y' represents the date Tuesday 05 June 2001, in which 'D' represents Tuesday and 'M' represents June. The '/' character is used to separate each part of the date. For example, the date format 'm/d' represents dates such as 06/02 or 26/05.
Field to use: Converts the part of a date into a number. The date format is 'D d M y'. For example, if you select the Month option, you can convert the date Tuesday 05 June 2001 into the number 6 because June is the 6th month of the year. To convert a part of a date into a number, select one of the following parts of the date:
Year: Converts the date into a number of years. Example: The date Tuesday 05 June 2001 02:12:46 PM is converted into 2001.
Month: Converts the date into a number between 1 and 12. Example: The date Tuesday 05 June 2001 02:12:46 PM is converted into 6 because June is the 6th month of the year.
Day of Year: Converts the date into a number between 1 and 365. Example: The date Tuesday 05 June 2001 02:12:46 PM is converted into 156 because 05 June is the 156th day of the year.
Day of Month: Converts the date into a number between 1 and 31. Example: The date Tuesday 05 June 2001 02:12:46 PM is converted into 5 because 05 June is the 5th day of the month.
Hour: Converts the date into a number between 0 and 12. Example: The date Tuesday 05 June 2001 02:12:46 PM is converted into 2 because the number of hours in 02:12:46 PM is 2. The particular values are the following: The time 12:00:00 AM is turned into 0, the time 12:00:00 PM is turned into 12.
Minute: Converts the date into a number between 0 and 59. Example: The date Tuesday 05 June 2001 02:12:46 PM is converted into 12 because the number of minutes in 02:12:46 PM is 12.
Second: Converts the date into a number between 0 and 59. Example: The date Tuesday 05 June 2001 02:12:46 PM is converted into 46 because the number of seconds in 02:12:46 PM is 46.
Milliseconds since 1970: Converts the date into a number of milliseconds which have elapsed since the first of January 1970 according to the definition of UNIX epoch. Dates before the first of January 1970 are not converted.
Number Parameters: Specifies the target number format that converts:
A string into a number or multi-valued number
A multi-valued number into a string or multi-valued string
A multi-valued string into a multi-valued number
You must specify the decimal and hundreds separators.
Decimal Separator: Select one of the following decimal separators:
Point: For example, 1234567.89
Comma: For example, 1234567,89
Thousand Separator: Select one of the following thousand separators:
No Separator: For example, 1234567,89
Space: For example, 1 234 567,89
Comma: For example, 1,234,567,89
Quote: For example, 1'234'567,89
Multi-Valued Parameters: Specifies the field separator that converts:
A string into a multi-valued string or multi-valued number
A multi-valued string into a string
A multi-valued number into a string
Click one of the available separators (Semicolon, Tabulation, Comma, Space, or Slash), or click Other, and then type a separator. The default value is Semicolon. For example, to convert the string "MeteoRecipients;NewsRecipients;ExchangeRecipients;SpotsRecipients;TrafficRecipients;TaxiRecipients" into a multi-valued string, you must click Semicolon so that the Property Type Convertor Operator removes all the semicolons for converting the string into a list of a multi-valued string. If you want to convert the multi-valued number (2000 5000 10000 20000) into a string, you must select a field separator to separate the elements of the list in the string. If you select Slash as the field separator, the resulting string is "2000/5000/10000/20000".