Automatic Conditions - Grid Objects

WorkWithPlus provides several mechanisms to automatize the behaviour of the KB. In this section, we'll learn about Automatic Conditions and Event Blocks

The Challenge

Let's suppose we have a multi tenant application, where every application user has an associated company. So, in all the Default Lists and Prompt objects we want to filter by that company, in order to visualize the proper records.

To do this, WorkWithPlus provides  Automatic Conditions, that you can define and setup from the WorkWithPlus settings.

TransactionFeaturesAutomaticConditions_img01

TransactionFeaturesAutomaticConditions_img02.png

So, we can insert Automatic Conditions in the Selection and Prompt hierarchical declaration:

TransactionFeaturesAutomaticConditions_img03

After defining the condition, we do 'Update Instances' in order to impact these changes in the instances of the KB.

TransactionFeaturesAutomaticConditions_img04

Finally, we apply pattern and visualize the conditions of PersonWW:

TransactionFeaturesAutomaticConditions_img05

As you can see, the condition was added in order to filter by the &CompanyId variable. You should also, load that variable in each screen. As we want to automatize this behaviour too, we'll add an Event Block to do it:

MultiTenantApplication4

If you want to read more details about how to create a MultiTenant application, please click here.

Summary

Well done! You should now be able to:

  • Add a new Automatic Condition to automatize the behaviour of your KB
  • Add a new Event Block to automatize the behaviour of your KB