Contents Hide
$BV$ is the BrightXpress value marker. They are used as place holders and get substituted at run time by BrightServer to construct a string, which will vary depending on the place holders used. This allows them to be used to prepare the names of the files to be synchronised to and from BrightServer. When the files are specified for the file sets for a file data source, $BV$ value markers can be used to create a file path and name, for instance, depending on the user who is currently logged onto BrightServer.
For example, in a file based synchronisation scenario, you may want to segment a customer list for each rep in the field and may want them to synchronise a customer list applicable to them only. For this particular instance, predefined value markers may be used, creating a file name for the set similar to the following:
D:\MyFiles\customer\Customer_$BV$_USER_ID_$BV$.txt
With the above filename specified, when BrightServer processes a sync request for the customer table for the current user, it will use the ID of the user to construct the file name. For instance, if the ID of the user were 1234, then the customer file to be read for this user would be “D:\MyFiles\customer\Customer_1234.txt”.
The $BV$ value marker may also be used with the names of columns in the table being synchronised to/from the server. For example, if a table had the field 'ID', the value for this field of a particular record may be referenced using the following file path/name:
D:\MyFiles\customer\imagedata\img_$BV$ID$BV$.txt
This feature may be used with the External File property in mappings, such as in order to export signature and image binary data into separate files. Using this, the mapping may also refer to raw image files which exist on the file system, utilising the mapping exclusive 'rawBinary' data type.
The following is a list of $BV$ place holders that can be used
Constant | Description |
<COLUMN NAME> | Returns the value of the column for the record being written. If the column name does not exist for the table being synchronised, the string "[<COLUMN NAME> not found]" will be used. |
_DATE_ | Returns the current system date and time |
_NUN_ | Returns the next unique number. The next unique number is calculated using the milliseconds passed since midnight 1 January 1970. BrightServer ensures that a distinct number is returned each time, if the processing takes place in the same millisecond. |
_DATE_MIDNIGHT_ | Returns the starting time of today. i.e. today’s date with 00:00:00.000 time. |
_USER_ID_ | The ID of the user who is currently connected to BrightServer. |
_USER_NAME_ | The name of the user who is currently connected to BrightServer. |
An optional format field can be specified together with a $BV$ place holder. To specify the format of the field, use a semicolon (‘;’) after the selected $BV$ marker. This format field would be for date-time value or numeric field.
For example below $BV$ value will read the system time and convert it to a date-time string in dd/MM/yy format.
$BV$_DATE_;dd/MM/yy$BV$