Datatable Expression Error

dt1.AsEnumerable.Max(Function(a)Convert.ToDouble(a(“VALUE”).ToString))

Above is the expression but is no longer working since we upgraded to Modern (2023.10).

Error message: ‘VisualBasicValue’1’ requires compilation in order to run.

I am trying to get the maximum (total count) from the column “VALUE” as a “System.Double”

Any suggestions are welcome on what I need to change. @yoichi

Cheers

Steve

HI,

It may be double quote matter in Windows project.
For now, can you try to replace (retype) all the double quote with " (0x22 character)?

Regards,

HI Yoichi

I have replaced the quote marks.

I am now getting this error:
image

Any thoughts?

Cheers

Hi,

It seems dt1 has no datarow. Can you check content of dt1 at Locals panel when error occurs?

Regards,

Hi Yoichi

Correct - dt1 doesn’t have any rows. Now I am just trying to determine the behaviour before the upgrade. Would it have thrown this error if no rows were there?

Cheers

Hi,

I don’t think behavior of Max method is change before and after the upgrade/migration.

Regards,

Thank you as always Yoichi.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.