Dynamic Validations

 

WorkWithPlus for Web provides the possibility to add Dynamic Validations to the transactions. These validations can be defined at runtime with the attributes you previously added in the references. 

Dynamic validations are used as an alternative to some validations added in the transaction rules since they are responsible for performing the validations in these. The main difference is that they are defined at runtime, so a system administrator could change them at runtime.

In GeneXus you will enable the Dynamic Validations for a certain Transaction, and define which Attributes of the Transaction you will need to reference in the Dynamic Validation:

 WorkWithPlus transaction editor shows the "Attributes to reference in dynamic sections or validations" dialog listing Project attributes (ProjectStartDate, ProjectPrice, ProjectStatus, ProjectId, ProjectRealCost, ProjectDescription) alongside their reference names (StartDate, Price, Status, ID, RealCost, Description). A red arrow connects the dialog to the Properties panel's "Referenced Attributes" entry, shown under "Allow Dynamic Validations" set to True.

 

Then, at runtime, you will define all the Dynamic Validations, mentioning the Attributes defined as Referenced Attributes:

"Dynamic Validations for Project" runtime editor lists two existing validations ("The price cannot be greater than 1..." and "The project cannot last more than 6...") with an "Add validation" button; a Validation popup is open showing the message "The price cannot be greater than 10.000" and a Validation condition field "&P > 10000" with an autocomplete list showing Description and Price, plus Test condition, Confirm, and Cancel buttons.

 

In order to use it, you must have the Dynamic Forms Module activated.

 

If you have dynamic sections and you have validations done on these sections, it is not necessary to use dynamic validations, but it is useful in cases where you do not have dynamic sections.