Substring Function in Advanced PDF Templates

For example,

The user has a free-form text custom column field (id: “custcol5”) storing the specially calculated value with the value being 14.5555555555555555 and has to print this value using the Advanced Printing form but only with 2 digits after the period. Use the “substring” and “index_of” functions, built-in features of Advanced Printing. 

Sample Code

${item.custcol5}
	${item.custcol5?substring(0,item.custcol5?index_of(".")+3)}

This will show only 14.55

Leave a comment

Your email address will not be published. Required fields are marked *