I have often encountered this error whenever I am attempting to modify a formula inside a For Loop of different types, in this case JToken.
When I edit the List of items the For Each activities triplicate in the squence and cause the errors mentioned below.
The formulae that I am using are something along the lines of json_array_tenant_data(0)(“data”).AsEnumerable().Where(Function (x) x(“name”).ToString.ToLower.Contains(“randomname”) or x(“name”).ToString.ToLower.Contains(“otherrandomname”))
I am using Windows Legacy REFramework, Studio version 2022.4.6
UiPath.System.Activities version is 22.4.5. I apologize but I won’t be able to provide the json response. I have tested those queries individually and they should work fine. I also don’t believe it’s a JSON issue as I have encountered this issue when running other enumerable types in the For Each activity as well.
Thank you, the link was very helpful. I was attempting to delete the extra For Each activities but they wouldn’t go away, which prompted me to create this topic.
Whenever I would attempt to modify the TypeArgument of these buggy activities, they would blank out and erase everything inside, including text fields.
What I ended up doing to recover from this was to Undo actions up until the bug occured. Set the TypeArgument to Object, made the necessary adjustments to the List of items formula and then switched the TypeArgument back to JToken.
Everything is back to normal for now. I mainly wanted to highlight this issue and check whether it was a common occurrence as it was not my first time running into it.