BPC RiskManager and BPC SurveyManager Importer Masks
Both BPC SurveyManager and BPC RiskManager are shipped with a low level import/export tool. In BPC RiskManager the tool is hosted in the application server configuration screens and protected by randomly generated code which you access by providing telephoning or emailing BPC HelpDesk with the information on the screen when requested and entering the code we provide you. In surveymaager the import/export tool is built into the client server client. The tool provides low level access to the database and reads CSV files (such as those produced by MS XL).
The importer has a number of useful capabilities designed to allow manipulation of the data during import and is primarilly intended for bulk import tasks. One of those capabilitites is the importer masks, which allow rapid conversion and formatting of data during import.
The importer masks, therefore, make modificatons to the imported fields.
The structure of a bpcMask is as follows: FORMAT=part1;part2|part3
part 1 is required, parts 2& 3 are optional part1 is a literal string with an optional '*' The * is replaced by the existing contents of the field (after part2 & part3 mods are applied) part2 is '_' and/or '0' and/or 'K;' The '_' causes all blanks to be replaced with '_' The 'Cx' causes the leading x character to be removed The 'Kx' causes everything to the right of (and including the first 'x') to be deleted The 'kx' causes everything to the left of (and including the first 'x') to be deleted The 'Fx-n.mf causes a max of m chars from the source to be placed in an n char field left (-) or right (no -) justified and padded with x part3 is a delphi format mask (see below)
Makes mods to the imported fields as follows:
T#;_0|(000)_000-0000;0;* In this Order: - Replace blanks with '_' (_) - Strip leading zeros (by converting to a number) (0) - Use everything after | as a format mask - Finally take the result and put a T infront So 00001234567899 would become T(123)_456-7899 And With T#;_ would make 00ABC DEF become T00ABC_DEF
T*;C0F06.5f|000000;0;* will convert 0000003628 into T003628
Refer to FormatMaskText Below for more info.
Character Meaning in mask ! If a ! character appears in the mask, optional characters are represented in the returned string as leading blanks. If a ! character is not present, optional characters are represented in the returned string as trailing blanks. > If a > character appears in the mask, all characters that follow are in uppercase until the end of the mask or until a < character is encountered. < If a < character appears in the mask, all characters that follow are in lowercase until the end of the mask or until a > character is encountered. <> If these two characters appear together in a mask, no case checking is done and the data is formatted with the case present in the Value parameter. \ The character that follows a \ character is a literal character. Use this character to use any of the mask special characters as a literal. L The L character requires an alphabetic character only in this position. For the US, this is A-Z, a-z. l The l character permits only an alphabetic character in this position, but doesn't require it. A The A character requires an alphanumeric character only in this position. For the US, this is A-Z, a-z, 0-9. a The a character permits an alphanumeric character in this position, but doesn't require it. C The C character requires an arbitrary character in this position. c The c character permits an arbitrary character in this position, but doesn't require it. 0 The 0 character requires a numeric character only in this position. 9 The 9 character permits a numeric character in this position, but doesn't require it. # The # character permits a numeric character or a plus or minus sign in this position, but doesn't require it. : The : character is used to separate hours, minutes, and seconds in times. If the character that separates hours, minutes, and seconds is different in the regional settings of the Control Panel, that character is substituted in the returned string. / The / character is used to separate months, days, and years in dates. If the character that separates months, days, and years is different in the regional settings of the Control Panel, that character is substituted in the returned string. ; The ; character is used to separate the three fields of the mask. _ The _ character automatically inserts spaces into the returned string.
Any character that does not appear in the preceding table can appear in the first part of the mask as a literal character. Literal characters are inserted automatically if the second field of the mask is 0, or matched to characters in the Value parameter if the second field is any other value. The special mask characters can also appear as literal characters if preceded by a backslash character (\).
The second field of the mask is a single character that indicates whether literal characters from the mask are included in the Value parameter. For example, the mask for a telephone number with area code could be the following string:
The 0 in the second field indicates that the Value parameter should consist of the 10 digits of the phone number, rather than the 14 characters that make up the final formatted string.
A 0 in the second field indicates that literals are inserted into the Value string, any other character indicates that they should be included. The character to indicate whether literals should be included can be changed by changing the MaskNoSave constant that is declared in the MaskUtils unit.
The third field of the mask is the character that appears in the returned string for blanks (characters that do not appear in Value). By default, this is the same as the character that stands for literal spaces. The two characters appear the same in the returned string.
Note: When working with multibyte character sets, each special mask character represents a single byte. To specify double-byte characters using the L, l, A, a, C, or c specifiers, the mask characters must be doubled as well. For example, LL would represent two single-byte alphabetic characters or a one double-byte character. Only single-byte literal characters are supported.