What does the CONTAINS operand do in pfilters?

Can someone please explain to me how the CONTAINS operand works in pfilters? I had thought it was like a SQL "LIKE" comparator, but that doesn't seem to be correct.

Best Answer

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    Contains should function similarly to SQL LIKE command. What is the syntax you’re using? Are you URL encoding your pfilter value?

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**

Answers

  • The documentation is here: https://domo-support.domo.com/s/article/360042933114?language=en_US

    If I remember correctly, it functions similar to an "in." So contains ("ItemA", "ItemB", "ItemC") means if it's Item A, B or C it will filter.

  • Actually, no that's wrong. There's already an IN in pfilters. I'm not sure how contains functions.

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    Contains should function similarly to SQL LIKE command. What is the syntax you’re using? Are you URL encoding your pfilter value?

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • I'm using the same syntax that I would on an "IN" or a "BETWEEN" both of which work fine for me.

    {"column":"BorrowerLastName","operand":"IN","values":["Fuller","FULLER","fuller"]} works as expected

    {"column":"BorrowerLastName","operand":"CONTAINS","values":["Fuller"]} returns no values.