Cast Collection's Data Type
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
26-02-18 01:10 PM
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
26-02-18 02:08 PM
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.
