Power-Fx icon indicating copy to clipboard operation
Power-Fx copied to clipboard

System.InvalidOperationException: Operation is not valid due to the current state of the object

Open yunhapark97 opened this issue 1 year ago • 0 comments

Hi! Cards team has been running into System.InvalidOperationException: Operation is not valid due to the current state of the object.

System.InvalidOperationException: Operation is not valid due to the current state of the object.
   at Microsoft.PowerFx.Types.VoidValue.ToObject()
   at Microsoft.PowerCards.Scripting.PowerFxScriptRunner.RunScriptAsync(Object memory, String script, CancellationToken cancellationToken) in C:\__w\1\s\src\PowerCards\Microsoft.PowerCards.Scripting\PowerFxScriptRunner.cs:line 142

From investigation, it seems that the following expression might be relevant:

If(#$PowerFxResolvedObject$# = #$string$#; Collect(#$fne$#; { #$fieldname$#:#$string$# }); If(#$PowerFxResolvedObject$# = #$string$#; Navigate(#$PowerFxResolvedObject$#); If(#$PowerFxResolvedObject$# = #$string$#; Navigate(#$PowerFxResolvedObject$#))))

Any insights or guidance on this issue would be greatly appreciated. Thanks a lot for your time and help in advance!

yunhapark97 avatar Jan 23 '24 18:01 yunhapark97