Hello there
Hopefully a quick one to resolve. The below eQL returns all eB containers with "Risk" and "Hazard" in the title (in that order), along with those linked to projects containing certain text. Is there any way of adding a line to request that projects containing the word "CANCELLED" are not returned? I was thinking of a NOT LIKE statement but I'm not having much luck with it. Any ideas? I'm relatively new to eQL so would really appreciate any help you can provide. For info, we're using version 16 of AssetWise (ALIM). Many thanks. Chris
START WITH Document SELECT Id, Code, Revision, Name, ApprovalStatus, Attributes["Global", "Suitability Status"].Value, Projects.Project.Code, Projects.Project.Name WHERE Name CONTAINS '%risk%hazard%' AND ( Projects.Project.Name CONTAINS 'WCM' OR Projects.Project.Name CONTAINS 'LNW (S)' OR Projects.Project.Name CONTAINS '- Central -' OR Projects.Project.Name CONTAINS 'LNE (N)' OR Projects.Project.Name CONTAINS 'North West' ) AND Projects.Project.Class.Path = 'Project' ORDER BY Code, Name, Revision
CONTAINS is for FTR. If you change them to LIKE and include the % wildcard it should work for you.
Does the following return what you would expect?
START WITH DocumentSELECTId,Code,Revision,Name,ApprovalStatus,Attributes["Global", "Suitability Status"].Value,Projects.Project.Code,Projects.Project.NameWHEREName LIKE '%risk%hazard%'AND (Projects.Project.Name LIKE '%WCM%'OR Projects.Project.Name LIKE '%LNW (S)%'OR Projects.Project.Name LIKE '%- Central -%'OR Projects.Project.Name LIKE '%LNE (N)%'OR Projects.Project.Name LIKE '%North West%')AND Projects.Project.Class.Path = 'Project'ORDER BYCode,Name,Revision
Thank you, Michael. I since discovered adding the line AND Projects.Project.Status = 'A', which filters out those Cancelled (i.e. 'C'), works!
Apologies... I misread your post completely. For some reason I got it in my head that you had issues with the LIKE vs CONTAINS.