How to build a query with the filter similar as SQL LIKE

Hi there,

In the SQL, we can use LIKE as the filter, but in the Appian, there is no such "operator". so in my case, I am trying to build a query to search a database by people's name.

if using operator "includes" or "starts with" to search value "Michael", then it will return list of people, but if search value "Michael S", it will return nothing, but it should return some.

in the SQL, we can use LIKE 'Michael S%', but dont know how to implement this in the Appian.

Could anyone here can help to point a direction?

Best regards,

Lin

  Discussion posts and replies are publicly visible

Parents
  • To note, I wouldn't expect to have any issues with your use case.

    The Appian "includes" operator for "Michael S" should operate as SQL does with LIKE '%Michael S%'.  The "starts with" operator should perform exactly as your SQL LIKE 'Michael S%' call.

    This is an example where we can search for "includes" value "ware deve" and it correctly returns any user with job title similar to "Software Developer".

    Can you share your code?

    a!queryEntity(
      entity: cons!USER_DS,
      query: a!query(
        paginginfo: a!pagingInfo(1,10),
        filter: a!queryFilter(
          field: "jobTitle",
          operator: "includes",
          value: "ware deve"
        )
      )
    )

Reply
  • To note, I wouldn't expect to have any issues with your use case.

    The Appian "includes" operator for "Michael S" should operate as SQL does with LIKE '%Michael S%'.  The "starts with" operator should perform exactly as your SQL LIKE 'Michael S%' call.

    This is an example where we can search for "includes" value "ware deve" and it correctly returns any user with job title similar to "Software Developer".

    Can you share your code?

    a!queryEntity(
      entity: cons!USER_DS,
      query: a!query(
        paginginfo: a!pagingInfo(1,10),
        filter: a!queryFilter(
          field: "jobTitle",
          operator: "includes",
          value: "ware deve"
        )
      )
    )

Children