Question
Paul Riker · Apr 21, 2020

XPATH Query with compound critiera

I'm looking for any codes that match my parameter that we have received since 1/01/2020 based on the FromTime, EnteredOn or Status (if both are empty).

 

(Problem[Problem/Code='%1' and FromTime>"2020-01-01"]) | (Problem[Problem/Code='%1' and (count(FromTime)=0 or FromTime="") and EnteredOn>"2020-01-01"]) 
| (Problem[Problem/Code='%1' and (count(FromTime)=0 or FromTime="") and (count(EnteredOn)=0 or EnteredOn="") and Status/Description="Active"])

 

This works like a charm with standard XPATH query tools but HS does not like it.

1
1 147
Discussion (2)1
Log in or sign up to continue

I've done some testing and I don't think it likes the dates.

I removed the "-" and did a subsctring on the first 8 characters to work around it.

Problem[substring(translate(FromTime,'-',''),1,8)>20200101]