Formatting of data connection tags

Normally you use a data connection tag like this: "[Mydatafield]", but somtimes you want to format the output of the data into a customized format. To allow this you add a ":" as seperator and then a mask of the format you want to apply to the data. Below is a overview of the different formating options available:

Anchor

Makes titles and other data into valid anchor ids. Example:
[Mydatafield:anchor]

if [Mydatafield] is "My anchor name", the result should be "my-anchor-name".


File and folder

There is a limited character set for filename and folder names. Using these data types, unsupported chracters are removed:
[Mydatafield:file]
[Mydatafield:folder]


Url

Takes a string and uses the same filtering on the string that Destinet page url generator uses.
[Mydatafield:url]


Url encoding

Makes a string into a valid parameter for an url. Converts caracters that are not allowed in url into % values.
[Mydatafield:urlencode]


Getting a substring

Using the substring mask you can limit the length og a string. Example starts at character position 0, and gets the 20 next characters.
[Mydatafield:substring:0:20]


Ellipsis

Sometime you want a string length cropped down without any word break, and with a trailing ".." if the length was redused. Example:
[Mydatafield:ellipsis:20]


Date formatting

[Mydatefield:yyyy-MM-dd HH:mm]

yyyy = 2017 (Year)
yy = 17 (Year)
MM = 02 (Month)
MMM = Feb (Month)
MMMM = February (Month)
dd = 10 (Day)
ddd = Fri (Day)
dddd = Friday (Day)
HH = 14 (Hour)
hh = 02 (Hour)
mm = 30 (Minutes)
ss = 30 (Secounds)

You can also use function add secounds, minutes, hours, days, months and years to the date.

[Mydatefield:adddays:30]
[Mydatefield:addyear:-1]

You can combine it with formatting.

[Mydatefield:adddays:-1:yyyy-MM-dd]


Replace

Replaces occurance of a string with another string. Example replaces all occurances of 'a' with 'b'.

[Mydatafield:replace:a:b]


Truncate numbers to kb or mb

You can truncate a size number field to kb or mb by using special flags:

[Mydatafield:#,##0,kb]
[Mydatafield:#,##0,,mb]