In USoft Binder property values, you can use predefined and user-defined variables. For example, you can set the Name property of a User Application item to
User Application {user}
where '{user}' is the predefined 'user' variable that has the database user (specified on the Database tab of the Project Properties sheet) as its value. If the current database user is SALES_DEV, the item name will be displayed as
User Application SALES_DEV
in the USoft Binder main window and also as a title bar across the top of the User Application window. If you duplicate the USoft Binder file for use with a different database user, you only need to specify the different database user name in 1 place.
Another property where variables are useful is the Startup Options property of the Free Object item, which could look like this:
-app MYAPP -ddfile -u {user} -pw {dbpassword} -{rdbms} -database {db} -run GenerateMY_JOB.txt
You can also use variables in the Database property on the Database Tab of the Project Properties sheet.
To refer to a USoft Binder variable, surround the variable name by curly brackets {} as in the example. Type the variable name using either the exact case spelling, or all-uppercase spelling. Any whitespace around the brackets will be ignored. The variable name must be either a predefined variable or a user-defined variable.
|
The following predefined variables can be referred to in all cases. Each corresponds to a project property (settable on the Project Tab ), except systemdir:
Variable
|
Corresponds with project property
|
projectname
|
Project Name
|
module
|
Module
|
language
|
Language
|
systemdir
|
(none; the value is the USoft installation directory)
|
bindir
|
(none; the value is the USoft bin directory)
|
In addition, there are predefined variables for database properties. They depend on whether you have specified (on the Database tab) "Common Properties for Repository and Application" or "Separate Properties for Repository and Application".
Common Properties for Repository and Application
If you have selected "Common Properties for Repository and Application", then you can refer to the following predefined variables for database properties:
Variable
|
Corresponds with project property
|
user
|
User
|
dbpassword
|
Password
|
rdbms
|
RDBMS
|
db
|
Database
|
owner
|
Owner
|
Separate Properties for Repository and Application
If you have selected "Common Properties for Repository and Application", then you can refer to the following predefined variables for database properties:
Variable
|
Corresponds with
Repository property
|
Variable
|
Corresponds with
Application property
|
repuser
|
User
|
user
|
User
|
reppassword
|
Password
|
password
|
Password
|
reprdbms
|
RDBMS
|
rdbms
|
RDBMS
|
repdb
|
Database
|
db
|
Database
|
repowner
|
Owner
|
owner
|
Owner
|
|
In a USoft Binder project, in addition to predefined variables, you can create variables of your own by setting the Variables project property. Click here for details.
|
|