Forum Discussion
DougHenning1
2 years agoCommunity Manager
In Jinja you can use [-5:]
on a string to get the last 5 characters. Example:
{{ a.field_name[-5:] }}
------------------------------
Doug Henning
------------------------------
- AmyChristensen12 years agoQrew Trainee
This is the solution I tried first, but without the colon - which is probably why it only returned a single character! Mark's solution was more straightforward for this use case, but I'll keep this in my hip pocket for the future. Thanks!
------------------------------
Amy Christensen
------------------------------