Remove a part of String in Advanced PDF template

These are the built-ins for the Advanced PDf template

1. Keep after
Removes the part of the string that is not after the first occurrence of the given substring.

Ex: ${item.employeefullname?keep_after(” “)} – This removes the string before the first occurrence of “space”. That is if the employee’s name is “E170 John Mathew” then the result will be “John Mathew”. It will remove “E170”

2. Keep before
Removes the part of the string that starts with the given substring.

Ex: ${record.subsidiarytaxregnum?keep_before(“(“)} – if the tax registration number is “12345(kerala)” then the result will be 12345. Removes (kerala)

Leave a comment

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