Someone smarter than me might have a Bubble-only solution, but moving text to a number field in bulk is tricky, so here’s one path you could take. Export your data to CSV > remove the $ with an Excel or Google Sheet function > upload the file and map the column to a number field. You won’t be able to modify existing records, so these would be new entries in your database (which you could get rid of later), so each number would need some kind of identifier to map back to your existing records (catalog item id?)
Upload them to a temporary data type with 2 fields: number field for the numbers, catalog field to map to the item id
After uploading, create a workflow off a button click: make a change to a list of catalog items > new number field = search for temporary data type: first item’s number, with constraint on the search: catalog item = this catalog item
I’d run this on a small sample to try it out first, but in theory, this should work. Also, I guess I should mention that if you’re still in development and don’t have a problem with just overwriting your data with the CSV upload, you can skip the whole workflow part. Just export > make the fix in a spreadsheet application > upload.
This method works but it creates new things instead of updating current things. In our case, we’ll need to keep our current catalog items and update them from here as we have purchase/customer history for these already. I should have made that clear in my initial post.
I think NigelG has posted a solution and I’m about to check it out. I believe his API solution will update current things.
Thank you for posting this API. Will this be able to move/convert the text data of one field into another field as number data? Can it move all 1k entries in the database in bulk?
I am looking at it now but am unsure how to implement it into my app. If you could please point me in the right direction on how to implement this, I’d be very grateful!
Sounds good! Yeah, my path would still allow you to keep your existing records, with the caveat of also creating new ones (with numbers/IDs only) to transfer the data from new to old and then deleting those new, “temp” records. Cumbersome. Hopefully Nigel’s API gets it done more efficiently!
Yes, however you might need to remove the leading $ with a regex as well.
Could you schedule an API call on the list of catalog items, then in the API workflow set a new numeric field by calling the API with the API Connector ?
I think the limit is 1 API call a second on the web task, so that would probably work OK.