eQL for when file is "Not required" when Suitability Status is also "Not required"

Hello everyone!

Hope you're all happy, safe and well.

I require some help with an eQL statement. I have created one that searches if a container has a file, with the result showing Yes or No (see below line-grab):

CASE Files.InDefaultVisibleScope WHEN 'Y' THEN 'Yes' ELSE 'No' END

Is there a way of linking this to the container's Suitability Status field, so that when someone has selected a Suitability Status of "Not required" then the file result also appear as "Not required" instead of just Yes or No? Basically, if someone has said that there will never be a file needed for a container, the report (eQL) should say so, rather than Yes or No. At the moment, I have to manually change "No" to Not required" for those containers marked accordingly.

I do hope this makes sense!

Kind regards

Chris

Parents
  • With eQL you can nest Case statements.

    So if for example you are starting with Document and Suitability Status is an attribute on the document you can use the below eQL to get what you want.

    START WITH Document
    SELECT
    CASE Attributes["Global""Suitability Status"].Value
    WHEN 'Not required'
    THEN
       'Not required'
    ELSE
       CASE Files.InDefaultVisibleScope
       WHEN 'Y'
       THEN 'Yes'
       ELSE 'No'
       END
    END
    WHERE IsTemplate = 'N'

Reply
  • With eQL you can nest Case statements.

    So if for example you are starting with Document and Suitability Status is an attribute on the document you can use the below eQL to get what you want.

    START WITH Document
    SELECT
    CASE Attributes["Global""Suitability Status"].Value
    WHEN 'Not required'
    THEN
       'Not required'
    ELSE
       CASE Files.InDefaultVisibleScope
       WHEN 'Y'
       THEN 'Yes'
       ELSE 'No'
       END
    END
    WHERE IsTemplate = 'N'

Children