You can add your own entity search criteria and incorporate them into the existing [Search] tab.
To create a set of specific criteria grouped together on a dedicated tab, see Advanced filter.
Step 1: Creating the attribute on the search object
- In the dictionary, open the object corresponding to the search form of the function. This is a "Search" category object, the name of which is that of the function with the SEL suffix. Example: WOREPORTSEL.
- On the [Attributes] tab, click on the add icon
.
- Under the "Filter criteria" heading, fill in the fields defining the criterion. Once you have selected the domain, create the criterion with the Configuration by clicking on the icon
.
- Select the attribute in the tree structure of the elements linked to the current object:
Object linked to the current object with a single link: select one of its attributes.
Object linked to the current object with a multiple link: select one of its attributes.
Attribute selectable as a filter criterion. By clicking on it, you add it, together with any link information, to the right-hand window.
- In the right-hand window, complete with the operator to be applied to the criterion.
Step 2: Adding the field to the custom form
- Create a custom form corresponding to the search form of the function. Example: "Report search" form of the "Work report" function.
- Once you are in customization mode, add a name and a field, the value of which will be:
#{formAnimator.searchBean.xxx } where xxx is the name of the new attributed of the search object.
The addition of a "time zone" filter criterion on a search screen is a special case (example: on the WOSEL object for work order searches).
There is no need to create an attribute in this case: the "timeZoneId" attribute is available on the search screens.
Simply add a field and directly enter the value: #{formAnimator.searchBean.timeZoneID}
Examples
Simple criterion
Purchase price range for Assets.
- On the MATERIALSEL object, create the following attributes:
- Minimum purchase price:
- Name: purchasePrMin
- Name and Comment: Minimum purchase price
- Domain: AMOUNT
- Attribute: purchasePr
- Operator: Greater than or equal to
- Maximum purchase price:
- Name: purchasePrMax
- Name and Comment: Maximum purchase price
- Domain: AMOUNT
- Attribute: purchasePr
- Operator: Less than or equal to
- Create a custom form of the "Assets" function, "Asset search" form.
Add to it two fields with respective values of: #{formAnimator.searchBean.purchasePrMin} and #{formAnimator.searchBean.purchasePrMax}.
Criterion for a linked element
Additional cost present on one of the purchase request lines.
- On the PRSEL object, create the following attribute:
- Additional cost:
- Name: extraCostCode
- Name and Comment: Additional cost
- Domain: CODE_SEARCH
- Associated entity: STRING
- Attribute: purchaseLines / extraCosts / extraCost / code
- Operator: "like"
- Create a custom form of the "Purchase request" function, "Purchase request search" form."
Add to it a field with the following value: #{formAnimator.searchBean.extraCostCode}.