Truncate (ACEweb Only) ​
Truncates memo fields to specified length, preserving whole words at break.
ACEweb Routines/Templates ​
Required Parameters ​
- Memo field to truncate (e.g. tCat.cabenefits, oCourse.CatDescript())
- Length of field to return (e.g. 200 - returns 200 characters of field, including spaces and punctuation in that count)
- Character string used for continuation designation, entered in quotation marks (e.g. "...")
Optional Parameters ​
None
Example(s) ​
##Truncate(oCourse.CatDescript(), 200,"... [click course link to view full description]")## returns 200 characters of the course description, with the ... [click course link to view full description] continuation string at the end, e.g.:
This course helps you master the power of ACEware. Quickly learn how this flexible and dynamic program helps your become a registration virtuoso! Amaze your friends and co-workers with astounding feats... [click the course link to view the full description]
Notes ​
If the character string length is reached before the end of a word, the whole word is returned. E.g. returning exactly 200 characters of the above example would have only returned part of the word 'feats'. Rather than cut off the word, it includes the entire word in the return string.