Symptom
You have created a custom field in cloud application studio. When edit condition in approval process for the field, only 'Contains' or 'Does not contain' are available in the Compare Operator drop down list.
Environment
SAP Hybris Cloud for Customer
SAP Cloud Application Studio
Reproducing the Issue
- You have created a custom field in cloud application studio. The field is created at item level; the type of the field is numeric, such as Quantity or Amount.
- Go to Administrator work center.
- Go to Approval Processes work center view.
- Select and Edit the Approval Process of the business object which contains the custom field.
- In Conditions section, click on Edit Condition button.
- In Field drop down list, select the custom field.
- In Compare Operator drop down list, only 'Contains' or 'Does not contain' are available, while you expect 'Greater than', 'Less than' or 'Equal to' here.
Cause
The reason for which the operators such as 'Grater than', 'Less than' or 'Equal to' does not come up in the condition editor is because this attribute is created at the item level. Item is usually at a many association from the root. For attributes of such type ( [] - collection type ), only 'Contains' and 'Does not contain' are supported. It is not possible to compare a collection of values against a single value and this is not supported by the framework for evaluation as well.
Resolution
For the custom field created at item level (collection type attributes) only 'Contains' and 'Does not contain' are supported when Edit Condition in Approval Process for the field. This is system standard behavior.
Keywords
compare operator, contains, custom field, approval process, conditions , KBA , SRD-CC-BTM , Business Task Management , Problem