How to enter retrieve profiles (selection criteria)

Tony Marston - 6th June 2000

If you have ever tried to construct a form which uses a single entity definition for the entering of retrieve profiles you will have hit a big obstacle. UNIFACE does not know the difference between a profile being entered and new data being entered, therefore it fires off all the field validation triggers. This will insist that all mandatory fields on the entity have non null values, which can be frustrating when you don't want to specify a value for some of these fields.

1. Use a subtype
One variation is to use a separate area for the input of retrieve profiles using a subtype of the entity in question. All the mandatory fields can then be modified locally to make them optional, but this is messy.
2. Use a dummy entity
A better method is to create a dummy entity for the input of profiles. As this would only contain optional fields there would be no need to play around with any mandatory settings. It is even easier if the dummy entity is defined in the application model with the relevant fields as it would be instantly avaiable to every form and would not need local copies to be created manually.
3. Use a separate form
This is where the profile is entered on one screen and the results passed on to another to be processed and displayed. In this case it is possible to use the true entity definition, not a dummy, provided that you do the following:

This is the method that I have employed for many years with great success.

Tony Marston
6th June 2000