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
BedrockMission!

Learn more

View all

Sign in to view all badges

MarlonNelson
Community profile MarlonNelson Level 1
Job title here
Location here
2 BADGES
Level 1

Level 1

Learn more
Joined the community 14-01-2021 9:11:33 AM
Offline
Top badges earned by MarlonNelson
Customize the badges you want to showcase on your profile
Re: How do I get a substring of an entity property in my...
Avatar
Give Back
Level 1
MarlonNelson
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
View profile
MarlonNelson
- Adobe Target
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/')")

Views

101

Likes

0

Replies

0
How do I get a substring of an entity property in my design?
Avatar
Give Back
Level 1
MarlonNelson
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
View profile
MarlonNelson
- Adobe Target
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?

Views

108

Likes

0

Replies

1