Try something along the lines of
Case when length ("name") < 15 then "name" else wordwrap ("name",15) end

I havent got my computer with me, but might be a work around.

On Mon, 6 Jun 2016, 6:40 PM <burghardt.scho...@stadt.wolfsburg.de> wrote:

> Hi,
>
> I created a bug report for this issue: http://hub.qgis.org/issues/14963
>
> Regards
> Burghardt
>
> > -----Ursprüngliche Nachricht-----
> > Von: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] Im Auftrag von
> > burghardt.scho...@stadt.wolfsburg.de
> > Gesendet: Mittwoch, 18. Mai 2016 13:10
> > An: qgis-user@lists.osgeo.org
> > Betreff: [Qgis-user] Label Formatting - Wrap on character with "wordwrap"
> >
> > Hi all,
> >
> > my System: Ubuntu 14.04, QGIS 2.8.7 / 2.14.2
> >
> > I want label a layer with long attribute values. The label should wrap
> after a
> > number of characters. For this I use the function "wordwarp" in the
> > expression string builder (e.g. "wordwrap("name", 15)"). In the output
> > preview the wordwrap is displayed correctly. But in the map all the words
> > with less than (e.g.) 15 characters will be hidden and the wordwrap will
> not
> > be displayed.
> > Am I doing something wrong? Can anyone give me a hint?
> >
> > Best regards
> > Burghardt
> >
> > ***************
> >
> > Stadt Wolfsburg
> > Geschäftsbereich IT - 15-3 GIS
> > Rathaus E, Zi. E403, Porschestraße 47A, D-38440 Wolfsburg Tel +49 5361
> 28-
> > 2531 Fax +49 5361 28-1765 mailto:burghardt.scho...@stadt.wolfsburg.de
> >
> >
> >
> > _______________________________________________
> > Qgis-user mailing list
> > Qgis-user@lists.osgeo.org
> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> _______________________________________________
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to