microsoft / microsoft/Power-Fx

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

Open
#2,163 0 comments 0 reactions 1 assignee View on GitHub

@anderson-joyle is already working on this.

Since Jan 23, 2024.

MS_CARDS
Dominant language
C#
Stars
3.4k
Forks
358
Avg merge
10h 34m
Merged PRs (30d)
3

Description

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!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.