Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

concat substring

Avatar

Not applicable
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

Level 10
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

Not applicable
As Paul said, change the script to Javascript.



The following will then concatenate the strings.



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

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now