Forum Discussion

Ben-Dev's avatar
Ben-Dev
Helper II
4 years ago
Solved

Hard to Catch Error

Hello, Could someone on the Microsoft side confirm what’s going on in a certain hard to catch error scenario?   For both of the below examples: Query Editor display an error message (“Expression...
  • Ehren's avatar
    Ehren
    4 years ago

    Simply referencing the value apparently doesn't raise an error. But enumerating the rows does.

     

    What happens if you do this?

    try Table.Buffer(Data)

     

    This should force the enumeration of the rows.

     

    EDIT: Note that there may be other less-expensive ways to initiate enumeration. Buffering is just the first thing that came to mind.

  • Ben-Dev's avatar
    Ben-Dev
    4 years ago

    Thanks, Ehren.

     

    For triggering the enumeration with minimum expense, I'm attracted to "Data{0}?", based on the thought that it has the advantage of only pulling at most one row—just enough to cause the error to be raised.