Understanding Dynamic Syntax
Understanding Dynamic Syntax
The syntax
There are basically 2 syntaxes; the item syntax and the table syntax.
$[$<ItemUID>.<ColumnUID>.<DataType>]
Where <ItemUID>, <ColumnUID> and <DataType> is the 3 things you need to provide.
Page 1/7
Here we have the Sales order were we have pointed out 6 fields that we will look at. They all represent the different datatypes we will encounter in SAP Business One 1. 2. 3. 4. 5. 6. String values (Customer Name) Integer values (Document Number) Dates (Posting Date) Data on line level (Price After Discount) Decimal values (Discount) Decimal values mixed with currency codes (Document Total)
We will now look at each and determine how we translate into the dynamic syntax. String values (Customer Name) Its item UID is 54 and the type is a string. Copyright 2011 Boyum IT A/S Page 2/7
It is not on line level so there are no columnUid involved (we indicate this by setting it to 0) The string data type in the syntax is either shown by to enter STRING or the more popular 0 (because it is faster to write). With this information our dynamic value will be:
= $[$54.0.STRING] = $[$54.0.0]
If we used this in an SQL-sentence:
= $[$8.0.NUMBER]
If we used this in an SQL-sentence:
= $[$8.0.DATE]
If we used this in an SQL-sentence:
Page 3/7
(2007-10-20) is an invariant standard of dates, so you wish to compare dates please use this format. Data on line level (Price After Discount) Its item UID is 38 and the type is a mix of decimals and currency. This is on line level so we also need to set the ColumnUid which is 17 The decimal/currency data type in the syntax is either shown by to entering NUMBER or CURRENCY1. With this information our dynamic value will be:
= $[$38.17.NUMBER] = $[$38.17.CURRENCY]
If we used this in an SQL-sentence:
= $[$24.0.NUMBER] = $[$24.0.CURRENCY]
If we used this in an SQL-sentence:
Before version 2.740 you need to use CURRENCY as datatype here. After version 2.740 NUMBER and CURRENCY work the same way. This was done to be closer to the Formatted Search Syntax
Page 4/7
Decimal values mixed with currency codes (Document Total) Its item UID is 29 and the type is a mix of decimals and currency. It is not on line level so there are no columnUid involved (we indicate this by setting it to 0) The decimal/currency data type in the syntax is either shown by to entering NUMBER or CURRENCY2. With this information our dynamic value will be:
= $[$29.0.NUMBER] = $[$29.0.CURRENCY]
If we used this in an SQL-sentence:
Before version 2.7.4.0 you need to use CURRENCY as datatype here. After version 2.7.4.0 NUMBER and CURRENCY work the same way. This was done to be closer to the Formatted Search Syntax
Page 5/7
Here we have a user defined field called Kit Number but since it is only part of the side-bar and not part of the main window we need to use the table syntax:
$[<TableName>.<FieldId>.<DataType>]
Working the same way as with the item-syntax we need to provide the 3 values needed. The table the field is on is ORDR and the field is U_KitNo The data type is string (STRING or 0)
= $[ORDR.U_KitNo.STRING] = $[ORDR.U_KitNo.0]
If we used this in an SQL-sentence:
Page 6/7
$[PERIOD]
B1UP specific keywords To extend the formatted search syntax, the B1UP accepts the following keywords Keyword $[USERNAME] $[DATABASENAME] $[LOCALIZATION] $[COMPANYNAME] $[SERVERNAME] $[SERVERDATE] $[SERVERTIME] $[SYSTEMID] $[INSTALLATIONID] $[CURRENT_PANE] Description The username of the currently logged in user The name of the database logged into The Database country localization The name of the company The name of the server The date of the server presented in the client format The time of the server presented in the client format The System Id of the company The Installation Id of the company The forms current pane
Page 7/7