Cascader with ILIKE

After completing a selection from a cascader I get a very long phrase in my search separated by "/". The problem with this is that this is not represented in my database. So I can't use a simple = {{cascader1.value}} type command.

Instead do I need an ILIKE function and if so, why isn't this working?

Here's my code:

select
Projects.ProjectID,
Projects.ProjectName,
ProjectType.ProjectDescription,
Projects.ProjectType,
Projects.ProjectSubType,
DesignCriteria.GIAIncludingBasement,
Cost.CostTotal,
Cost.CostTotal/DesignCriteria.GIAIncludingBasement AS [Cost Per m2],
ProjectImages.ImageURL,
ProjectImages.ImageURL1,
ProjectImages.ImageURL2
from ((((Projects
INNER JOIN DesignCriteria ON Projects.ProjectID = DesignCriteria.ProjectID)
INNER JOIN ProjectType ON ProjectType.ProjectID = Projects.ProjectID)
INNER JOIN Cost ON Cost.ProjectID = Projects.ProjectID)
INNER JOIN ProjectImages ON Projects.ProjectID = ProjectImages.ProjectID)
WHERE ProjectType ILIKE {{ '%' + cascader1.value + '%' }};

Here's the left panel:

Hey @thomasatkinson – this is a common pattern in Retool that can be a bit confusing. If your cascader component is returning a .value as an array, you'll need to use the IN keyword in your SQL. More information here: SQL Cheatsheet

Thanks, Justin! I'll try that out. In the end the problem was with my SQL; I had to define the table from which the value was being selected