I have a named query that has a where clause that looks like below:
WHERE
title like ‘%{titleContains}%’
and titleContains is a QueryString. This clause looks for title that contains the string titleContains. I am expecting the clause to not filter anything when an empty string is passed in. But named query will give an error if titleContains is an empty string:
thanks for the quick response, it does work for me.
but I do want to see whether admins would consider allowing passing empty QueryString type parameter.
How are you feeding the parameter to the named query? Are you sure its going through as an empty string and not potentially as a None which I think would translate to a NULL?
No, not after seeing the solution provided by @bkarabinchak.psi. Now I am just curious why it wouldn’t allow empty string in a QueryString type parameter.
I initially used QueryString because that gives me similar syntax to a vision query binding. Now I am switching to perspective and I have to use a named query.