I build a query for a workbook that has several variables in the where clause (
like '%' || :variable || '%') but every time I click visualize from the query or click OK in the Diagrams "Global Where Clause" TDP changes the statement in (like ' '). What gives?
Where you want to create a more complex variable like you are trying to do here you may want to provide guidance to the user to add the wildcard as part of the input value in prompt
Another option would be to try using the editor and not the visual query builder - this removes the step where you need to visualize your edits. You lose the ability to "see" your query in the visualized format but you have a little more freedom in your SQL construction.