How do I do a case insensitive search using a!queryFilter? For example, the valu

How do I do a case insensitive search using a!queryFilter? For example, the value in the database table could be aPPiAN and the user could try to search using the keyword - appian. How can I do bring back the results irrespective of the case entered?

OriginalPostID-149151

OriginalPostID-149151

  Discussion posts and replies are publicly visible

Parents
  • Do you use a view? In that case the below procedure could be chosen as one of the alternatives:
              -          Maintain another copy of the column (on which you are searching) in lower case or upper case using the functions in database.
              -          The query filter should be applied on this new column and send the value of the filter as per the case maintained in the new column.
                        a!queryFilter(
                                  field: "<field_name>", /*added newly*/
                                  operator: "=",
                                  value: fn!lower(ri!filterValue_txt) OR fn!upper(ri!filterValue_txt) /*upper or lower functions can be used depending on the case maintained in database*/
                        )

    By doing in the above way, AFAIK it could help you retrieve the results in much efficient way and you could also make a direct query instead of writing the rules in Appian to do the work.
Reply
  • Do you use a view? In that case the below procedure could be chosen as one of the alternatives:
              -          Maintain another copy of the column (on which you are searching) in lower case or upper case using the functions in database.
              -          The query filter should be applied on this new column and send the value of the filter as per the case maintained in the new column.
                        a!queryFilter(
                                  field: "<field_name>", /*added newly*/
                                  operator: "=",
                                  value: fn!lower(ri!filterValue_txt) OR fn!upper(ri!filterValue_txt) /*upper or lower functions can be used depending on the case maintained in database*/
                        )

    By doing in the above way, AFAIK it could help you retrieve the results in much efficient way and you could also make a direct query instead of writing the rules in Appian to do the work.
Children
No Data