1

I'm using the Unplugged Mobile Controls and have a UnpFlatView on one of my XPages. The Detail column is displaying data from a field in which the user records free-form text, which can get quite lengthy.

I would like to check the length of the text in the field and, if it's over a certain length, truncate it and append an ellipsis.

My first thought was to change the column in the view to something like :-

@If(@Length(MyField) > 100; @Left(MyField; 100) + " ..."; MyField)

but Unplugged doesn't support @Length. Is there another way to achieve this other than creating a second field on the document?

Martin Perrie
  • 398
  • 5
  • 16

1 Answers1

1

Mark Dixon from Teamstudio has raised a ticket for @Length to be added to Unplugged and kindly provided the following as a workaround :-

@If(@Left(MyField; 100) <> MyField; @Left(MyField; 100) + " ..."; MyField)
Martin Perrie
  • 398
  • 5
  • 16