How to append texts from multiple text box as new lines?

I am trying to append text from two text boxes to write it in an entity record. I want them to be entered as separate lines. Also as the activity repeats the new entry should be appended to the existing text as new lines. Any idea to achieve this would be helpful.

If you could manage to do this before submitting the data to the App, it may work.

Entry= Entry + Environment.NewLine + New Line

Where Entry is the original data that you have pulled from the Entity Data field

Thanks for the reply,
Looking for the similar functionality, I cant find it in apps so far. please let me know if you have any idea.

It’s all about thinking out of the box regardless of the consequence. Here is one way it might be possible.

First I create an Empty Text Area box and bind it to an App Variable

Next, I go to notepad, and type this text into it with a line break

Note that my cursor although not visible is above the line I have typed

image

Then, in the Page Load Event, I initialize the App variable to the following:

image

And when I view the App in the Browser, this is what I get:

image

Basically, what I am thinking is building on this idea. Something you may want to try out:

Let us say you have 3 values to append.

Your expression would be:

var_NewEntityLine = Concat("Line1", var_LineBreak, "Line2", var_LineBreak, "Line3", var_LineBreak)

Which should theoretically translate to:

Line1

FAKE LINE BREAKLine2

FAKE LINE BREAKLine3

FAKE LINE BREAK

Finally, when you insert the data into the Entity field, you would do a replace of the fake line break

Replace(var_NewEntityLine, "FAKE LINE BREAK","")

which should translate to:

Line1

Line2

Line3

Give this a shot, and please contribute your solution back to the community if you succeed! Will help us help you! :slight_smile:

CORRECTION: Apologies. I have been working on one too many things at the same time.

Here is what you can do in place of Replace

And here is the end result. Seems like it is working!
image

Sorry about that!

1 Like

Definitely this a solution and also I have made it work with another solution.

I declarer a variable, created a fake entity record with a field containing below value
="

"
assigned the record to data scope and mapped the variable with the field on page load and used it.

1 Like

Great! Thanks for marking this post as a Solution. It will help others in the community.
Happy to know you have made progress on your project.

:slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.