Truncated operation not showing

I’m trying to truncate the end of a long response from an API by using truncated. Specifically, I want to truncate the following last portion of text after the second comma so it only shows the first text characters (i.e., the date):

I don’t understand why n my Link element the truncate operation is not showing:

I suspect it is because for this list I’m using the Get data from an external API approach and not just showing the current cell’s data (like the first component). I’m using this work around because I’m trying to show a nested list from the API, and this is the only way I can get it to show.

Any thoughts would be appreciated thanks!

Can you use an extract with Regex? A quick google search for a regex expression to truncate after character should throw up soon samples and in sure you will find one for the second comma. It is a common enough requirement.

Thank you I will try this approach as well.

One thing to note is that I am getting returned a List of Texts and not objects. I tried to sort by Item #: This Cell’s Index (and other approaches, which to allow me to Truncate) but for some reason it seems like there’s an issue pulling or getting data from the underlying API.

I think you could google for a “Regex to extract n characters after character” and you will find a solution out there. I wonder if it is a text. It looks to me like an international data/time which might be a Thing. Unfortunately, I don’t know enough about APIs to be much help. Perhaps try posting a new post but instead of making it sound like bubble’s truncate is not working use a title that says exactly what the problem is. Something like “Need to extract yyyy-mm-dd from wjs.com API”. That is more likely to sound more like a challenge to those that know APIs. Good luck finding a solution.

I am running into the same problem of not finding the “truncate” function in the backend API workflow section. I’m not sure if it was a conscious decision to leave it out as an option, or if it was just a mistake when building the backend API interface.

I would really need that feature to get the last 8 digits of the unique id that is created for a new item! So any recommendations of what to do instead? I’m not sure how to use Regex to extract the last x characters?

CORRECTION: The “truncate” feature is available in the backend workflows, but I was trying to truncate a list, when I needed to do it to one item. So I figured out how to fix it.

1 Like

Busted my head for a couple hours. Heres the solution. Extract with regex and the regex pattern is :

^[."a-zA-Z0-9-“’#?”,@:+*’-;\uD83C-\uDBFF\uDC00-\uDFFFu2700-\u27bf\w\W ]{1,250}

That pattern allows for all characters, numbers, emojis and also multiple lines. The end 250 is the number you enter to limit to that many characters.

PS: For anyone that needs to do that to a dynamic list in the api payload, i do “format as text” then enter the regex in there. Basically adding on to this post