A preprocessor replaces parts of a rule body during execution in order to ease development, have dynamic rules or to facilitate a more secure execution.
We'll be using the following Business Object Model for this explanation.
Name | Example | Description |
---|---|---|
Business Object | <%=Table("Customer")%> | Business objects get mapped to tables in the database during deployment. Replaces the tag with the correct table name. |
Attribute | <%=Column("Customer","Phone")%> | Attributes gets mapped as columns in tables in the database during deployment. Replaces the tag with the correct column name. |
One-to-Many Relationship Key | <%=Key("Customer","CustomerOrder")%> | One-to-many relationships create foreign keys in accompanying tables during deployment. Replaces the tag with the correct column name of the foreign ID. |
Many-to-Many Primary Key | <%=Key("Order","OrderProduct","Entity")%> | Many-to-many relationships creates an linking table between two business objects. Replaces the tag with the correct primary key of the Order table that is used by the linking table. |
Many-to-Many Foreign Key | <%=Key("Order","OrderProduct","Association")%> | Many-to-many relationships creates an linking table between two business objects. Replaces the tag with the correct foreign key in the linking table that links to the Order. |
Many-to-Many Linking Table | <%=Table("OrderProduct")%> | Many-to-many relationships creates an linking table between two business objects. Replaces the tag with the correct linking table name. |
Unique identifier
Name | Example | JavaScript Equivalent | Description |
---|---|---|---|
@TOKEN_ACCESSSUBJECTS@ | List of all roles, access subject, the user is assigned to in the runtime environment the current user is logged into. Comma separated. | ||
@TOKEN_ALLACCESSSUBJECTS@ | @TOKEN_ACCESSSUBJECTS@ + User Access Subject on user + access subjects of groups. Comma separated. | ||
Environment Domain ID | @TOKEN_DOMAIN@ | d | |
@TOKEN_GROUPACCESSSUBJECTS@ | Replaces the tag with all the groups the current user is part of, comma separated. access subjects | ||
@TOKEN_SYSTEMDOMAIN@ | The domain | ||
@TOKEN_SYSTEMDOMAINUSER@ | name of schema tenant | ||
User ID | @TOKEN_USERACCESSSUBJECT@ | The current user's Access Subject Code | |
Sorting column | @SORT@ | If you are using a Grid on a page, then the SORT and DIR are automatically passed when you click on a column's header. Replaced with the column's schema name | |
@DESC@ | |||
Sort order | @DIR@ | If you are using a Grid on a page, then the SORT and DIR are automatically passed when you click on a column's header. Replaced with the sort direction, either ASC or DESC. |
Functional Tags
Name | Example | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sorting | <%=Sort("@SORT@","@DESC@")%> | Replaces with an ORDER BY @SORT@ @DESC@ if both SORT and DESC are passed to the rule | ||||||||||||||||||||||||||||
Search | <%=Filter(OPTION=:Name_OPTION, VALUE1=:Name_VALUE1, VALUE2=:Name_VALUE2, FIELD=col_Name)%> | Replaces with a the correct WHERE clause if OPTION is present and a correct VALUE1 and VALUE2. If OPTION is missing or not enough information to make the statement, it ignores that tag.
| ||||||||||||||||||||||||||||
Not Null | <%= IfNotNull(":NewCost", "AND (COL_COST = :NewCost)") %> | Replaces with the second |