Truncate not work

Hello, is that on the page or in server connect?
What expression does it generate?
Is it not working on the page or is the problem only in the UI?

Helo @Teodor I would like to return only 120 characters

Adriano, can you just answer the questions I asked? I understand nothing from your random clicks on the page.

We are having the same issue. Messaged you the details Teodor.

1 Like

Please explain to him Dave in this same post

We are using formatters as normal and selecting truncate from manipulation, and are seeing the following:

We are adding the binding by double clicking the lightning bolt within the paragraph text, selecting it, then using the formatter to apply the truncate property, the result is the attached image.

Wappler 3.0.1 Windows 10/64

1 Like

is that on the page or in server connect? the page and server connect

Thanks @Dave

1 Like

I have exactly the same issue - App Connect on the page to show part of the returned data. I got round it by hard-coding.

I added .trunc(200, true, "...") to end up with {{prodDesc.trunc(200, true, "...")}}

So is it not working on the page, or you guys just see the error when editing the expression in the UI?
If it’s not working on your pages, what is the expression generated exactly?

The latter in our case. We try to add the formatter to the binding as per usual, and click select after defining the truncate variables, the error is then shown.

Thanks Dave, we will check this.

1 Like

It’s working on the site, it’s the UI that gives the error. Hard-coding it resolved it for me.

1 Like

George will fix this after the summer break :slight_smile:


As @sitestreet pointed out this workaround resolves the issue for now. Thanks @Teodor :slight_smile:

1 Like

Is it possible to truncate from end count? The beginning length of the string varies but the second half (what is needed) is always a set number of characters.

I figured it out now sub and minus operation.

some.value.substr((some.value.length() - 60), 60)

1 Like

yes the same here :frowning: