Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

concat substring

Avatar

Former Community Member
I am trying to concatenate two fields; I want all of the values from field 1 but only the last 4 from field 2. is there away to specify sub scripts using the concat



I am currently trying to use

$.rawValue = Concat("WAP", _2_SS[6,9])
2 Replies

Avatar

Former Community Member
Change your script to use javascript then you can do a search on the web for substring in javascript (there are lots of resources out there.



Note - when you want the value of a field use fieldname.rawValue

Avatar

Former Community Member
As Paul said, change the script to Javascript.



The following will then concatenate the strings.



fieldname.rawValue = String.concat(value1, value2)