cancel
Showing results for 
Search instead for 
Did you mean: 
LuukOlthof
Level 5
Status: Delivered

I would like to be able to change the order of the fields in a collection just like you can in aa Multi Calc stage.
Currently when you have a collection and you add a field to it it will always be added as the last column. Even is you add a field in between existing fields, when you close and open the collection again the new field is added at the bottom.

With big collections used for reporting it would be a lot easier to have the ability to change the order without having to rebuild the collection

14 Comments
Status changed to: Planned-Now

Hi @LuukOlthof,

Thanks for taking the time to raise an idea!

We plan to provide this enhancement in our upcoming Blue Prism Enterprise 7.4 release, expected Q4 2024. As a result of this, I'm updating this idea to Planned - Now.

Regards,

Rob

Hi @LuukOlthof 

In true Blue Peter style here is one i created earlier. I had a similar requirement to create a collection which would then be written to excel but the columns had to be in a specific order. I created the below code to do that, just remember that collections are zero based so the first column is zero second is 1 etc. The inputs are Input Collection, Column Index and Field Name, with column index being the position of the column in the collection. Outputs are Success, Message and Output Collection, if anyone else thinks this would be useful then please feel free to use this code as well. Hopefully this helps 🙂

Try

Output_Collection = Input_Collection.Copy

Dim Newcol As DataColumn = New DataColumn(Column_Name, GetType(String))
Output_Collection.Columns.Add(Newcol)
Output_Collection.Columns(Newcol.ColumnName.ToString).SetOrdinal(Column_Index)

Success = True

Catch ex As Exception

Message = ex.Message.ToString
Success = False

End Try

Status changed to: Delivered

Hi @LuukOlthof,

This enhancement has now been delivered in Blue Prism Enterprise 7.4, released 21st November 2024. Release notes for this version can be found here - let us know if you have any questions!

 

As a result, I'm going to update this idea to Delivered.

 

Regards,

Rob