Search behaviour within Records for integers

Hi Guys,
Is it correct that if a field referenced in the title of a record listview is of type integer then pattern match on search doesnt work?

eg if there is a field which contains 123456 then any partial searches of 123 or 45 etc will not work but a full search of 123456 works.

Before I go to the effort of changing/ casting the fields in question (as the datasets are large so i'd rather not have any unnecessary overhead), is that out of the box behaviour or a bug that we're aware of?

Cheers,
Chris

OriginalPostID-236249

  Discussion posts and replies are publicly visible

Parents
  • Sanjay - to be clear, you are trying to essentially search "includes" on number, right? E.g., get 12367 as a result of searching "123" or "36"?

    I am not aware of any way to do this aside from adjusting the data source--the DB view in your case--because the queryFilter can't query against a manipulated value. The view is the most appropriate place to make such a data manipulation, unless the table should be changed based on your use case for populating the field.

    If the view is being referenced by other objects (which isn't recommended; generally, each record list should have its own dedicated DB view), then you could ADD a column instead of REPLACE the existing column. Either way, the definition of the column would essentially be the following, for Oracle:
    cast NUMBER_FIELD as VARCHAR2(255)

    I recommend you investigate whether the DB index on this column (hoping that one exists) would still be used by the DB's cost-based optimization (CBO). If the CBO won't use the index because of the type-cast, then you may want to explore other options such as changing that field's data type in the underlying table.
Reply
  • Sanjay - to be clear, you are trying to essentially search "includes" on number, right? E.g., get 12367 as a result of searching "123" or "36"?

    I am not aware of any way to do this aside from adjusting the data source--the DB view in your case--because the queryFilter can't query against a manipulated value. The view is the most appropriate place to make such a data manipulation, unless the table should be changed based on your use case for populating the field.

    If the view is being referenced by other objects (which isn't recommended; generally, each record list should have its own dedicated DB view), then you could ADD a column instead of REPLACE the existing column. Either way, the definition of the column would essentially be the following, for Oracle:
    cast NUMBER_FIELD as VARCHAR2(255)

    I recommend you investigate whether the DB index on this column (hoping that one exists) would still be used by the DB's cost-based optimization (CBO). If the CBO won't use the index because of the type-cast, then you may want to explore other options such as changing that field's data type in the underlying table.
Children
No Data