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

As we're quickly taking off into 2023, our Adobe Target Product teams want to hear your top interest areas for learning opportunities and value realization with Adobe Target ~ to fill out the survey with your suggestions, experience, and feedback, follow the link to the right.

How do I get a substring of an entity property in my design?


Level 1

I'm able to use the replace method on an entity property:


#set ($pageUrl = $entity1.pageUrl.replace(".com", ".org"))


I want to get a substring of the property also.  Specifically, I want to insert characters before a trailing slash.  I'm wanting to do something like this:


#set ($pageUrl = "$entity1.pageUrl.substring(0, $entity1.pageUrl.length()-1).new/")


Can this be done somehow?  If so, where's it documented?


Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies


Level 1

I'd probably need to add braces like this:

#set ($pageUrl = "${entity1.pageUrl.substring(0, $entity1.pageUrl.length()-1)}.new/")

Alternatively, something like this would be nice:

#set ($pageUrl = "$entity1.pageUrl.replaceAll('/$', '.new/')")