Hi there,
Can you let me know what expression I can use to show only the last 4 digits of accountnumber in one of the fields in Custom Action (under Actions in Journey Builder)?
I tried this but throwing me errors saying i cannot use the character '-' like this because it is a keyword of the language. I tried adding double and single quotes to wrap -4 but no luck either.
substr(toString(#{headfield.at(0).accountNumber}), (length(toString(#{headfieldat(0).accountNumber})) - 4), 4)
Thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
You can use the following expression. Feel free to replace 123456789 with the accountNumber attribute path
substr(toString(123456789), (length(toString(123456789)))-4)
You can use the following expression. Feel free to replace 123456789 with the accountNumber attribute path
substr(toString(123456789), (length(toString(123456789)))-4)
Hi @Mohan_Dugganab, I managed to replace 123456789 with the attribute fieldname and no errors. Thanks heaps!
For email, achieving the same objective, I used the same expression and no validation errors which I thought was weird as i didn't use {%=; would you mind take a look and let me know it looks right to you?
Views
Replies
Total Likes
In emails, you can use an expression mentioned in this post as the syntax is different https://experienceleaguecommunities.adobe.com/t5/journey-optimizer-questions/how-to-get-the-last-4-d...
Thanks @Mohan_Dugganab!
Views
Replies
Total Likes