Announcement

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

  • iContainsPattern and OR/AND/IN_LIST operators

    default operator in filterbar in grid is iContainsPattern i.e B* Ben it is similar to SQL like operator. there is more advanced option ==(Big Ben | Small John) unfortunately only in connection with equals operator.


    I can achieve it using criteria but it is not solution for end user:
    {
    "operator":"or",
    "criteria":[
    {
    "operator":"iContainsPattern",
    "fieldName":"Col1",
    "value":"B*Ben"
    },
    {
    "operator":"equals",
    "fieldName":"Col1",
    "value":"Sm*John"
    }
    ],
    "_constructor":"AdvancedCriteria"
    }


    Could you extend syntax and add operator LIKE to filter bar, ie "*=" :
    *= B*Ben
    *= (B*Ben | Sm*John)


    Same in Filter Builder. iContainsPattern is default operator but not in this list. So I can't use it.
    https://www.smartclient.com/smartgwt...filter_builder
    Add iContainsPattern to list available operators in dropdown.
    Last edited by Sanmargar; 17th Jul 2018, 00:02.

  • #2
    For FilterEditor usage, please refer to allowFilterExpressions, which’s gets you closer to what you want.

    DataSource.validOperators, and similar properties such as simpleType.validOperators, allow you to control the list of operators that appear in the FilterBuilder.

    To get all the way to the syntax you want would be a new feature - see the Feature Sponsorship service we offer.

    Comment

    Working...
    X