Subquery Error Using "LIKE" Condition

  • 1
  • Problem
  • Updated 3 years ago
  • Solved
Hello!

I'm using a condition on my model that uses a subquery to specify which records I'm pulling. For the subcondition I am trying to use the 'LIKE' operator, but I get a malformed query error. Here are some screenshots:






Any advice would be appreciated, thanks!
Photo of Eulogio Gallo

Eulogio Gallo

  • 1,874 Points 1k badge 2x thumb
  • confused

Posted 3 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
You have misunderstood how to construct subquery conditions.  (But don't worry - I think I see your confusion)

You have put the subquery definition in the property called "Subcondition logic".    That is not the right place. 
Push the new condition icon that appears in the left hand panel to expose a second condition builder. 



The subcondition logic property is used to define how multiple subconditions work together.  You'd expect a statement like this there:   (1 OR 2) AND 3 AND 4

So close.  You are so close... 
Photo of Eulogio Gallo

Eulogio Gallo

  • 1,874 Points 1k badge 2x thumb
Perfect! Totally solved my problem. For future reference, what should the Subcondition Logic field be used for?
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
The subcondition logic property is used to define how multiple subconditions work together.  You'd expect a statement like this there:   (1 OR 2) AND 3 AND 4
Much like condition logic set for the model as a whole, if you don't put anything in the property - Skuid assumes they are all tied together as AND statements. 
Photo of Eulogio Gallo

Eulogio Gallo

  • 1,874 Points 1k badge 2x thumb
Got it, thanks Rob!