Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Complex search criterion

    I would like to be able to create a criterion that behaves like a value range (multiple values defined) but which has different field types and editors for the 2 different values. This would essentially be a way to create a more complex criterion that logicallly groups multiple values together.

    -paul

    #2
    FormItem.operator allows you to take ordinary DynamicForm items and have the form produce an AdvancedCriteria object. You can also build an AdvancedCriteria yourself - it's just a simple JavaScript structure who format is explained in the 7.0 docs. Here's a sample:

    Code:
     var advancedCriteria = {
            _constructor:"AdvancedCriteria",
            operator:"and",
            criteria:[
                // this is a Criterion
                { fieldName:"salary", operator:"lessThan", value:"80000" },
                { operator:"or", criteria:[
                      { fieldName:"title", operator:"iContains", value:"Manager" },
                      { fieldName:"reports", operator:"notNull" }
                  ]  
                }
            ]
        }

    Comment

    Working...
    X