cancel
Showing results for 
Search instead for 
Did you mean: 

What is the correct use of the Utility - Collection Manipulation - Rename Collection Fields object?

JaredRumball
Level 6
I am trying to rename the columns of a collection using the Rename Collection Fields action of the Collection Manipulation VBO but can't get it to work. I have defined a New Headers collection with matching column names and a single row with the desired column names as per the documentation (which is sparse - an example or two would go a long way). But when I try to run this I get an Internal exception: "Internal: Collection fields are defined but cannot be matched to the incoming collection - The collection definition does not contain the field Customer Name" Besides this the action is supposed to return success flag and error message outputs - instead I get the Internal exception... Do other people have much success using the above collection utility to rename collection fields? Any pointers as to what I may be doing wrong here? It seems like this should be pretty straight forward. Any help is appreciated. Thanks.
2 REPLIES 2

KirankumarMahan
Level 4
Hi Jared, From the above response I could see the steps which you followed are accurate and there is no issues. Based on the exception I think it caused may be due to giving space in the column name under new headers collection. Remove the space and try again definitely the exception wont come. Regards, Kiran

JaredRumball
Level 6
Hi, thanks for your response Kiran. I have since tried with column names that do not have any spaces in them and had the same behavior. However what I have also come to realise through further testing is that this ""rename"" action requires an undefined collection (or a collection that already has the expected column names) to accept the action output i.e. it does not ""rename"" the columns of the input collection in place as I expected. Maybe this is obvious to others but it certainly wasn't to me given the terminology used (""rename"") and the Endpoint description of ""The collection fields will have been renamed."" What also caused confusion for me here is that using the action ""Rename Field"" I was able to successfully rename the fields of an existing collection in place one field at a time. From this I assumed that the ""Rename Collection Fields"" action would be a bulk rename version of the same operation but apparently not. Regards, Jared