18-07-20 09:17 AM
20-07-20 02:43 PM
20-07-20 05:17 PM
20-07-20 05:24 PM
I don't think you can with the stock Blue Prism objects; I believe the stock Collection Manipulation object only has text and numeric.
I wrote my own version of Append Field which allows you to add any type to a collection. I know you are looking for a non-custom coding solution, but just in case it might be useful, here's what I have:
Inputs:
Collection In (Collection)
Name (String)
Type (String)
Value (String)
Outputs:
Collection Out (Collection)
' Adds a field of the specified type to the collection. ' The type names must be specified with the system prefix. For example, System.String, ' System.Int32, etc. Collections are special and using the keyword "Collection" or ' "System.DataTable" will suffice. If Type_Name.ToUpper = "COLLECTION" OrElse Type_Name.ToUpper = "SYSTEM.DATATABLE" Then Collection_In.Columns.Add(Name, GetType(DataTable)) Else Collection_In.Columns.Add(Name, Type.GetType(Type_Name, True)) End If If Not String.IsNullOrEmpty(Value) Then For Each Row As DataRow In Collection_In.Rows Row(Name) = Convert.ChangeType(Value, Type.GetType(Type_Name, True)) Next End If Collection_Out = Collection_In