Forum Discussion

OZMckenzie's avatar
OZMckenzie
Helper I
6 years ago
Solved

query.Expression.Error.. there weren't enough elements in the enumeration...detail [Table]

Hello,

 

This issue seems has been asked several times in this forum, but I haven't found any solution workable to my question, so I am posting here: 

 

I am creating a function by duplicating one query, and modifiy the query steps by advanced editor. The purpose is to apply the same query steps to another worksheet in another Excel workbook.

 

In the advanced editor, I added "quartername" as the parameter, which is the file name of the Excel workbook. However when I input the name of the workbook and the click "invoke", an error message pops-up as "query. Expression.Error. Snapshot as below. I wonder what caused the error? The details only show [Table] which I don't quite understand.

 

Both workbooks contain several worksheets, but my target sheets are both called "quality data". And the format of both "quality data" are identical. BTW, the file name of the Excel workbook contains Korean character. 

 

Please kindly advise any thoughts or comments, thank you so much!

 

 

 

 

 

  • camargos88's avatar
    camargos88
    6 years ago

    Hi OZMckenzie ,

     

    Try this on #"Filtered Rows2" step:

    (each [Name] = quartername)

     

    Instead of string value, use the parameter defined as text,

4 Replies

  • camargos88's avatar
    camargos88
    Community Champion

    OZMckenzie ,

     

    It looks like you are not using the parameter quartername, only the string "quartername" for the SelectRows function.

      • camargos88's avatar
        camargos88
        Community Champion

        Hi OZMckenzie ,

         

        Try this on #"Filtered Rows2" step:

        (each [Name] = quartername)

         

        Instead of string value, use the parameter defined as text,