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 "678" and one of the record items had an Id that is 123456789, I would like that item to show up in the resulting list.

OriginalPostID-238592

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    I'm not sure this is possible on a primitive integer DB column, since the string equivalent of an integer wouldn't be apparent prior to base conversion (since presumably the DB would store int valus as binary until display time). One workaround I can think of off the top of my head, which should only be minimal effort, is to create a view for the table in question containing the same column cast as some text type instead of numeric, and then you could do the normal "contains" query filter.
Reply
  • 0
    Certified Lead Developer
    I'm not sure this is possible on a primitive integer DB column, since the string equivalent of an integer wouldn't be apparent prior to base conversion (since presumably the DB would store int valus as binary until display time). One workaround I can think of off the top of my head, which should only be minimal effort, is to create a view for the table in question containing the same column cast as some text type instead of numeric, and then you could do the normal "contains" query filter.
Children
No Data