Using truncate & split by to extract data from text
In this Bubble tutorial we demonstrate how text can be extracted and manipluated using truncate and split by in the Bubble app builder editor.
Unlock the power of text manipulation: Learn how to extract, truncate, and split data in Bubble with ease!
Master string data manipulation: Discover how to use truncate and split functions to format user input effortlessly.
Transform long text into usable data: See how to extract first names, last names, and more using Bubble's powerful string functions!
Extracting Data from Text with Truncate and Split By Functions
In this quick video, I will show you how to use the truncate and the split by functions in Bubble to extract and manipulate a longer string of text. I have an input field here with a long string of text and here are just some of the ways that I can extract different bits of data from it.
Using Truncate Function
I have a text field down here and I'm going to say input A's value and then let's say I just want the first 12 characters so I can use the truncate to 12 and then if I hit preview it will show me the first 12 characters. Now what if I wanted to do that from the end? Well Bubble also has a truncated from end which if I refresh now we just get the last 12 characters. If I go back to truncated from the start truncated 2 and refresh we'll see that this isn't so perfect because it's quite brutal to count by characters.
Using Split By Function
So what if I wanted to extract the first three words? Well, that's when I can use split by. Split by creates a list type in Bubble so if I say split by space and then I say items until 3 and then join with well let me just show you what this would look like to start with. This will list out the first three words but by default Bubble puts a comma between each one. In order to get rid of that comma I can use the join with space. So there we go I now have the first three words and if I wanted the first four words okay I can get the first four words.
Practical Applications
Those are just a couple of really handy tricks for reformatting the text data that your users may be putting into your app in order to get them in the format that you want. One example and this isn't going to be perfect would be first names and last names. I say it's not perfect because some people may have like a shorter yeah so they might have a shorter word in the middle like a muck for example followed by their surname but let me show you how this would work really well with first names and last names.
Extracting First and Last Names
So think of a first name last name I'll just put Tony Stark. So how would I extract just the first name? Well I can go with the split by a space and then I can just say first item and then if I wanted the last name I can go for last item. There you go that's just one example of how these little tricks knowing how to manipulate string data in Bubble can be really helpful.
Ready to Transform Your App Idea into Reality?
Access 3 courses, 400+ tutorials, and a vibrant community to support every step of your app-building journey.
Start building with total confidence
No more delays. With 30+ hours of expert content, you’ll have the insights needed to build effectively.
Find every solution in one place
No more searching across platforms for tutorials. Our bundle has everything you need, with 400+ videos covering every feature and technique.
Dive deep into every detail
Get beyond the basics with comprehensive, in-depth courses & no code tutorials that empower you to create a feature-rich, professional app.
Valued at $80
Valued at $85
Valued at $30
Valued at $110
Valued at $45
14-Day Money-Back Guarantee
We’re confident this bundle will transform your app development journey. But if you’re not satisfied within 14 days, we’ll refund your full investment—no questions asked.
Can't find what you're looking for?
Search our 300+ Bubble tutorial videos. Start learning no code today!
Frequently Asked Questions
Find answers to common questions about our courses, tutorials & content.
Not at all. Our courses are designed for beginners and guide you step-by-step in using Bubble to build powerful web apps—no coding required.
Forever. You’ll get lifetime access, so you can learn at your own pace and revisit materials anytime.
Our supportive community is here to help. Ask questions, get feedback, and learn from fellow no-coders who’ve been where you are now.
Absolutely. If you’re not satisfied within 14 days, just reach out, and we’ll issue a full refund. We stand by the value of our bundle.
Yes, this is a special limited-time offer. The regular price is $350, so take advantage of the discount while it lasts!