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

How to Create New Line in AEM Document Rendered in HTML

Avatar

Avatar
Validate 1
Level 1
chapmawi
Level 1

Like

1 like

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
chapmawi
Level 1

Like

1 like

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
chapmawi
Level 1

12-12-2018

Hi Everyone,

I'm creating a letter document using AEM Designer.  I need to have the data elements for an address formatted as shown:

Name

Address 1

Address 2

City, State Zip

All are data elements mapped into the letter xdp. I'm using the following JavaScript to conditionally exclude Address 2 if it contains a null value:

if (Address2.rawValue != null) {

   Address.rawValue = MailTo.rawValue + "\u000a" + Address1.rawValue + "\u000a" + Address2.rawValue + "\u000a" + City.rawValue + ", " + State.rawValue + " " + ZipCode.rawValue;

} else {

   Address.rawValue = MailTo.rawValue + "\u000a" + Address1.rawValue + "\u000a" + City.rawValue + ", " + State.rawValue + " " +ZipCode.rawValue;

}

This works when the document is rendered as a pdf but I need it render in HTML so it will be presented to the user in a browser.  I can't find an example of what the correct syntax should be.  Thanks to anyone who replies.

Willie Chapman

Replies

Avatar

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

449 likes

Total Posts

1,023 posts

Correct Reply

116 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

449 likes

Total Posts

1,023 posts

Correct Reply

116 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile
Veena_Vikram
MVP

12-12-2018

Hi Willie

   Are you mentioning about LifeCycle Designer ? kautuksahni​ . I think this needs to be moved to the right forum

Thanks

Veena

Avatar

Avatar
Validate 1
Level 1
chapmawi
Level 1

Like

1 like

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
chapmawi
Level 1

Like

1 like

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
chapmawi
Level 1

13-12-2018

Sorry I'm new here. Can you direct me to the correct forum?  I see forums for everything EXCEPT LiveCycle.

Thanks,

Willie

Avatar

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

449 likes

Total Posts

1,023 posts

Correct Reply

116 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

449 likes

Total Posts

1,023 posts

Correct Reply

116 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile
Veena_Vikram
MVP

13-12-2018

smacdonald2008kautuksahni​ Could you please help to move this content to right forum ?

Avatar

Avatar
Validate 1
Level 1
chapmawi
Level 1

Like

1 like

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
chapmawi
Level 1

Like

1 like

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
chapmawi
Level 1

14-12-2018

Sorry, got busy and forgot to reply that I did find the LiveCycle Designer forum. Thanks again!