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.

How to move the text to multple lines in a flat table

Avatar

Former Community Member

Hello All,

Could any one help me???

I had created a flat table, in one of the header field of the table i need to dynamiclly populate the data from two different fileds in to multiple lines. Currently i used concat function

$.rawValue = concat(field1.rawValue,  \n ,field2.rawValue)

but this didt work can any one help me. Your responce is grately appreciated

Regards,

Rakesh

6 Replies

Avatar

Former Community Member

Hello Communmity Members,

Can any one help me here?

Regards,

Rakesh

Avatar

Former Community Member

I think the \n shodul be in quotes.

Are you getting any error messages in the JavaScript console?

Paul

Avatar

Former Community Member

Hello ,

Thank you For the reply

If  \n is set to double codes the reader wont understand and it is printing with \n.

Regards,

Rakesh

Avatar

Former Community Member

You are right ...my mistake.

Is the field a the header a text field or a static textField. If I simply click in the header can I manually change the information?

If it is a staticField then you will not be able to change it using that command. or by hand when the form is rendered.

Paul

Avatar

Former Community Member

Hello Dude,

The field in the header is basically a text field. I need to do some scripting to populate value from multiple data fields into this field in multiple lines.

Could you please let me know if u have any idea of how to preoceed?

Regards,

Rakesh

Avatar

Former Community Member

Then I would put this command on the enter event of the field in question:

xfa.host.messageBox($.somExpression)

Preview the form. Then enter the header field and a message shodul display that gives you the SomExpression of that field. Now update your concat statement to use this somExpression in place of the fieldname. Once it works remove the app.alert expression from the enter event.

Note that you may have to cause a relayout for the field to update. If you have to use this command:

xfa.layout.relayout()

Paul