Querying with a Filter that checks substrings of integer

How could I query a database using a!queryFilter where the field it checks is an integer and would check if the search value is included in the whole integer?
e.g. If I searched "123" and one of the record items had an Id that is 123456789, I would like that item to show up in the resulting list.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Associate Developer

    Hi,

    I think in a!queryFilter if the field is integer we can use only some of the operators, And if it is string then we can take includes or start with operators which will be helpful for the solution.

    But you are taking the integer field. So, instead of using a!queryFilter take a rule to get all the data and use "like" function to search for data and get the values that are true from the output(wherecontains), and get the whole data by indexing. 

    I don't know whether it is exact solution but this will work

Reply
  • 0
    Certified Associate Developer

    Hi,

    I think in a!queryFilter if the field is integer we can use only some of the operators, And if it is string then we can take includes or start with operators which will be helpful for the solution.

    But you are taking the integer field. So, instead of using a!queryFilter take a rule to get all the data and use "like" function to search for data and get the values that are true from the output(wherecontains), and get the whole data by indexing. 

    I don't know whether it is exact solution but this will work

Children
No Data