Creating a report that allows searching a Fixed Value Multi Value attribute.

I am trying to create a report that easily allows a user to enter one or more values of a Fixed Value Multi Value attribute.  We are useing eB 15.5.1.  The name of the attribute is "Compliance Doc Type".  Is there away to allow the user to specify one or more of the values that they want the document to have in a report?  All of my attemps have failed.  The below eQl returns 48 documents or all of the ones that have one or the other values.  If I replace the OR with an AND I get 0 documents returned.  Thanks for your help in advance.

 

START WITH Document
SELECT
   Id,
   Attributes["Global", "DOC DATE"].Value,
   Name,
   Class.Name
WHERE
   (
      Class.Name = 'COMPLIANCE REPORTS'
      OR Class.Name = 'COMPLIANCE CORRESPONDENCE'
      OR Class.Name = 'PERMIT MANAGEMENT'
   )
   AND        (
          Attributes["Global", "COMPLIANCE DOC TYPE"].Value = @ComplianceDocType1
          OR Attributes["Global", "COMPLIANCE DOC TYPE"].Value = @ComplianceDocType2
       )
   AND Name LIKE @TITLE
   AND Attributes["Global", "REPORT NAME"].Value = @ReportName
   AND Attributes["Global", "DOC DATE"].Value > @DocDate1
   AND Attributes["Global", "DOC DATE"].Value < @DocDate2
ORDER BY
   Attributes["Global", "DOC DATE"].Value

Parents Reply
  • I pulled this from the EQL guide supplied by Bentley and had not seen it suggested yet in this thread:

    If documents use multi-value attributes and you want to find documents that have two or more values of a particular attribute, numerical identifiers let you distinguish among the different attribute values. Here is an eQL query for finding documents with at least two values of the Dept attribute, one set to Acct and one set to HR:

    WHERE

    Attributes["Global", "Dept"][1].Value LIKE 'ACCT'

    AND Attributes["Global", " Dept"][2].Value LIKE 'HR'

    AND IsTemplate = 'N'

    Meaning - Find documents with at least two values for the Dept attribute where one value is ACCT and the other value is HR.

Children
  • Does anyone know if this was fixed in 16.3.1? Thanks.
  • Hi Alex,

    I used below query and it gives me all the document contains either attribute or both:

    START WITH Document
    SELECT
      Id,
      Code,
      Class.Name,
      Attributes["Global", "Doc Type"].Value
    WHERE
      (
         Attributes["Global", "Doc Type"][1].Value = @Type1
         OR Attributes["Global", "Doc Type"][2].Value = @Type2
      )
      AND Name LIKE @Name
      AND Attributes["Global", "Doc Type"].Value IS NOT NULL

    I got below result where three documents mentioned with all three posibilities:

    Note: I tried the above query on 15.6.1.

    Regards,
    Manav B.



  • I apologize, that my original post is not completely clear and my eQL statement is miss leading.  The EQL statement that I posted works in 15.5.1 but it is when I switch it to an AND that I get no results and therefor doesn't work.  Can you please try your example with an AND and see if this has been resolved in 15.6.1.  If you have access to 16.3.1 and could test there as well it would be a huge help.  I was told that it would be resolved there but have not seen anything officially.  Sorry for the confusion.

    START WITH Document
    SELECT
       Id,
       Attributes["Global", "DOC DATE"].Value,
       Name,
       Class.Name
    WHERE
       (
          Class.Name = 'COMPLIANCE REPORTS'
          OR Class.Name = 'COMPLIANCE CORRESPONDENCE'
          OR Class.Name = 'PERMIT MANAGEMENT'
       )
       AND        (
              Attributes["Global", "COMPLIANCE DOC TYPE"].Value = @ComplianceDocType1
              AND Attributes["Global", "COMPLIANCE DOC TYPE"].Value = @ComplianceDocType2
           )
       AND Name LIKE @TITLE
       AND Attributes["Global", "REPORT NAME"].Value = @ReportName
       AND Attributes["Global", "DOC DATE"].Value > @DocDate1
       AND Attributes["Global", "DOC DATE"].Value < @DocDate2
    ORDER BY
       Attributes["Global", "DOC DATE"].Value

  • Hi Alex,

    after changing it to AND, its still working on both 15.6.1 and 16.3.1 for me.
    Only in one condition I am not able to get the result, when I Check Box for both, but pass the parameter only for Name:

    Could you please share the screen print as above, to check what went wrong.

    Regards,
    Manav B.



  • HI Alex,

    while working another SR related to the multivalue search issue similar to one reported here I found you has asked for official confirmation of fix in later version. I have confirmed that this was fixed for eB16.3 and higher versions.

    thanks,

    Roberto Garcia

                                          

    Address: Bentley | 10052 Mesa Ridge Court Suite
    100 | San Diego | CA | 92121 | USA



    Answer Verified By: Gintautas