cancel
Showing results for 
Search instead for 
Did you mean: 

Cast Collection's Data Type

KotaSaito
Level 3
Hi Guys. Please let me know if you have any idea for casting data type of collection's columns from "Text" to "Number". I understood using "Loop" and "Calculation"(ToNumber Function) is one of the method to solve this issue but this way requires a ton of time  especially for the collection which have more than 1000 rows. Should I use any "Utility VBO" or do I have to create new VBO by using Code stage..?   Thank you in advance.   Kota  
1 REPLY 1

John__Carter
Staff
Staff
Try creating a new collection with the same column names as the original, but change the text column to the number data type. Then use a calculation with the old collection as the expression and the new collection as the Store In. If all the text values can be cast to a number then this direct cast should work. Note that if any text values are blank or non-numeric then it won't work. Also remember to disable logging on the calculation.