Security using Javra IDE Rules

User defined Javra platform Rules can be used for program level security as well as field level security. It gives flexibility to define our own logic for using in Javra IDE. It is advised to use rule as security if a query is needed on database table.

  • Rules are basically used for securities in programs and widgets. To access or create rule go to X/E Files > Admin > Rules. Through this tab folder users can create new Rules.
Rules in javra IDE
Figure: Rules in javra IDE

Steps to create a new Rule:

  • Click on the [] button to create a new Rule, once clicked the screen in displayed in the edit mode.
  • Enter the new Rule name in the Validation field, and the description of the Rule in the Description
  • Enter the condition within the Condition field based on which the security of the rule would function.
  • Select an error name in the Error Field, for the error message that needs to be displayed in case of any error.
  • Once all the details are entered click on the [] button.

Using Query

  • While creating Rules users can use any conditions in the Condition field. For those Rules certain queries can also be created using the tab folder Query.
Query
Figure: Query

The below table gives a brief description of the fields in the Query tab folder:

Field Description
Program The name of the Rule is entered in this field.
Query Enter the query name in this field.
Main query Select this checkbox if the query is the main query
File in query List the file names that are being used in the query in this field.
External Tables In the query, if there are any tables which are used from the customer database those tables are listed down in this field.
Query clause Enter the query in this field.
Force open Select this checkbox in order to force open the query in case of error.
Check syntax Click on this button in order to check the syntax of the query when it is created before saving it.
On save Select this checkbox in order to check the syntax of the query once it has been saved.
  • Once the Rule is created, the Rule is then used in the security fields of Programs or Widgets wherever required.
  • As shown in the figure below, in the program ‘c/custmord.p’ within the security fields there are rules being used along with the function. Using Rules in Security fields

While using rules in the program security fields they are usually written starting with ‘#’, and then the rule name. As shown in the above figure the rule used here is ‘#folder’. The Rule will always return a ‘True’ or ‘False’ value, depending on the result; the security will be applied to the users. The program can perform the entire task only when the output of the rule results as true.

Syntax for Rules
Figure: Syntax for Rules

In the figure above you may see the Valid and Invalid syntax applicable for the rules

results matching ""

    No results matching ""