Hi all,
Please help me with the right variable type for the append item.
I have attached both old and new version append activity below two screen shots with red markings of my issue(could not append any item to the collection since its showing system.object) in the new version.
Learning from UiPath academy the “Data Manipulation with Lists and Dictionaries in Studio” topic. In the video part 1 they appended an item to the list and its type is list. Same when I tried to follow in latest community version 2024.2 its showing error the following error message.
System.ArgumentNullException: Value cannot be null. (Parameter ‘Collection’) at UiPath.Activities.System.Collections.AppendItemToCollection1.Execute(CodeActivityContext context) at System.Activities.CodeActivity1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Clear out whatever you have in the property, put your cursor in the property, press CTRL+K and then type a variable name, press enter. You can do this in all properties, and it’ll automatically create the correct type of variable for you.
The issue here isn’t the datatype, though, it’s that you haven’t initialized it. Go to the variables pane and put New List(of Object) into the Default for the variable.
thank you so much i did clear those field as you suggested and used ctrl+k and then as someone suggested I created list with type of string and now everything is working fine.