Can XMPie Truncate data?

30 views
Skip to first unread message

Starr S

unread,
Nov 15, 2024, 6:03:05 PMNov 15
to XMPie Interest Group
Is there a way to cap the length of a single line of data. If a persons name is to long and we don't want to do auto-fit and shrink the font size to keep all data the same size and each on it's own line.

Tyrone O’Brien

unread,
Nov 15, 2024, 6:46:49 PMNov 15
to xmpie...@googlegroups.com
Here is a script to check the length of name if it exceeds 

if (Length(@{Full Name}) > 10)
{
    (SubString(@{Full Name}, 0, 10)) & "..."
}
else
{
    @{Full Name}
}

In this script:

  • Length(  @{Full Name}  ) checks the length of the name.
  • SubString(  @{Full Name}  , 0, 20) extracts the first 10 characters of the name.
  • (..., "...") adds an ellipsis (...) if the name exceeds the 10-character limit.

On Sat, 16 Nov 2024 at 10:03, Starr S <pedal...@gmail.com> wrote:
Is there a way to cap the length of a single line of data. If a persons name is to long and we don't want to do auto-fit and shrink the font size to keep all data the same size and each on it's own line.

--
You received this message because you are subscribed to the Google Groups "XMPie Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmpie-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/xmpie-users/7002092c-d982-4312-b239-46db3acebf71n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages