User Defined Constants

User-Defined Constants allow an Administrator to specify a fixed value for a Constant. By having the Constant in this table called USERDEFINEDCONSTANTS, it allows you to amend the value of the Constant without going into Scripts that may use it.


These Constants are typically used by Developer Partners in scripting or Custom Reporting, however Development-X also makes use of these.


User Defined Constants published by Development-X allow you to control the default behaviour of Ostendo. Development-X makes use of these to increase the functionality of Ostendo. These can act like switches to control how Ostendo can process or display information. New constants are added over time as Development-X continues to make use of this approach to provide further flexibility and functionality to Ostendo without the need to publish official Updates. By using this approach, we can control behaviour in one database different to that in another.


Constants only need to be defined if you wish to make use of the additional logic associated with the Constant.


Below is a link to all current Development-X User Defined Constants. It should be noted, that these constants are generally only available to the most Current Ostendo Update


http://ostendo.info/downloads/ostendo/User_Defined_Constants.pdf

 

To retrieve the value of this constant in a script, you just use a SELECT statement. For example, if you have defined a constant called "ABC", then to retrieve the value of "ABC" you can use a statement like:

 

GetSQLresult('Select CONSTANTVALUE from USERDEFINEDCONSTANTS where CONSTANTNAME = ''ABC''') ;

 

Entry and Display fields

 

Constant Name: Enter a short identity of the Constant.  It is this Name that is called within the Script and the value contained field 'Value' becomes the value of the Constant in the Script

 

Constant Type: From the drop-down list select the field type of the 'Value' field.  This will ensure that a value of the correct format is entered.  The Drop-down list options are:

Text

Decimal

Integer

Currency

Yes/No

Date

Time

 

Value: Enter the definitive value of this Constant

 

 

Buttons

 

Close: This will close the User-Defined Constants screen.  If you have any unsaved data then you will be asked if you wish to save it before the screen is closed.

 

Add: This will send the cursor to a new line for entry of a new User-Defined Option

 

Save: This will save the current data without exiting the screen

 

Cancel: Any changes made since the line was actioned or the last time the ‘Save’ Button was pressed will be lost.

 

Delete: This removes the current highlighted User-Defined Constant record from this list.  You should be aware that this only removes the value from this Table; it will not delete the link to this Constant that is currently in any Script.