Skip to main content
Question

Like ‘% <%=var%> %’

  • February 6, 2020
  • 2 replies
  • 6 views

Hello,

I would like to filter a field after comparing it to a variable.

The variable value is only a part of the field value, that is why I would like to use the "LIKE % % function.

I tried to define % and % as wrapping characters for the variable

I also tried to write % and % manually in the component filter formula.

( FILTER TABLE.FIELD LIKE % <%=VAR%> %; )

None of these worked. Is there a solution for this?

Thank you very much for your help,

Best Regards

Robin

2 replies

  • Author
  • Level 3
  • February 7, 2020
Hello, Has anyone any idea on how to solve this problem? Thank you for your help, Best Regards Robin

  • Level 0
  • February 7, 2020

Hi Robin,

your formula is almost correct! Simply adjust your filter to the following:

FILTER TABLE.FIELD LIKE %<%=VAR%>%;

The error occurs because you inserted spaces between the variable and the wildcards. This causes you to search a substring with spaces.

I hope this solves your issue.

Best,

Justin