AnsweredAssumed Answered

Concatenate expressions issue

Question asked by jay.kapalczynski on Nov 23, 2016
Latest reply on Nov 23, 2016 by xander_bakker

I have two expressions that work independently but cant get the syntax correct to put them together. 

 

expression1 = "trailblazers = 'No' OR regulations = 'No' OR safteysign = 'No'"

expression2 = "date >= " + "'%s'" %startdate + " AND " + "date <= " + "'%s'" %enddate

 

I tried this:

expression3 = expression2 + ' AND ' + expression1

expression3 = expression2 + " AND " + expression1

expression3 = "date >= " + "'%s'" %startdate + " AND " + "date <= " + "'%s'" %enddate + " AND " +  "trailblazers = 'No' OR regulations = 'No' OR safteysign = 'No'"

 

 

When I run expression3 it seems to ignore expression2 and gives me all the dates not the ones specified.  Confused because when I run expression1 and expression2 individually they do their job.

 

Thoughts?

Outcomes