Trim list of things to remove spaces (backend)


I have a list of thousands of suppliers which I have uploaded via CSV - a supplier “code” and a supplier “name”. Some of the Supplier Codes have been uploaded with spaces at the end which i need to trim to allow other CSV uploads of related things to work correctly.

It is not practical to do this individually, or to delete and re-enter.

How would I be able to do this via a backend workflow? (trim supplier code, only when the last X number of characters of supplier code is a space)


You can create an API workflow to run through your list of suppliers and trim the spaces.

So run an API workflow through the suppliers and change the code to be code:trimmed.

Learn Bubble @

Hi Tal,

Thanks so much - I didn’t realise :trimmed was an option. Doh!

When I went to run the API in the database, it was greyed out and said “no paramter”. Any ideas?


If you want to run a bulk operation on a API endpoint, be sure to have it as a single item. So on the endpoint add the parameter “Supplier” (be sure array is unchecked). Then the workflow action will be “make changes to a thing”, in the singular. This way on the bulk operation it will go through each entry within the database, specific to a view, by default this will be all entries.

Note: trimmed removes spacing at the start and end of a string, not in between stringd. You can use the :find and replace to find a space character and replace with nothing if needed.

Hope that helps.

1 Like

Thanks, I’ve got it now.

Thanks for your help both

No worries, should do the trick