web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Append Text Input to M...
Power Apps
Answered

Append Text Input to Multi Line Text Field on Edit Screen

(0) ShareShare
ReportReport
Posted on by 92

I am creating a visitor application

 

  • I have created a SharePoint Multiline text field and placed that on my Edit Screen
  • I have added a text input field and a ADD icon (+)
  • My goal is to
  1. Have the user type in someones name
  2. Select the ADD icon
  3. Have the entry Appended to a new line on the Multi line text field 
  4. Empty the text input field 

Below is my example 

 

Or maybe tell me if there is a better way to accomplish this 

 

my examplemy example

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,380 Most Valuable Professional on at

    Hi @marcgiag ,

    So I understand this right

    • Neither the input text field nor the add icon are on the form
    • The multi line SharePoint field is on the form
    • You are submitting the form by the normal SubmitForm function.

    As a suggested possible solution, all of this code below needs to be on the OnSelect property of the Add icon. I will call the text box AddName and the form field VisitorNames

    So the first thing you need to do is get the text already in the box. I will call the Variable vVisitorTxt.

    UpdateContext({vVisitorTxt:VisitorNames.Text})

    Now you add the new name to it - the bit in the middle should give you a new line

    UpdateContext(
     {
     vVisitorTxt:
     vVisitorTxt & 
     uriComponentToString('%0A') & 
     AddName.Text
     }
    ); 
    Reset(VisitorNames)

    Now the last bit - getting the value back into the form field. The last line above leads into it - you need to use the Default value of the field here. I do not know what other processes you use on this form, so I will use something I hope does not affect them. Set the Default value of the VisitorNames field to

    If(
     !isBlank(vVisitorTxt),
     vVisitorTxt,
     Parent.Default
    )

    What should happen here is when the field is reset by the add script, it will look for its default value, which as long as there is something in vExistTxt is that value. The last bit is to ensure that when the form is opened, it displays the existing data.

    After all of this, your form should save the new data in the field.

    The last thing you need to do is reset the variable otherwise it will still be there for the next record. So on both the save and exit screen scripts, add this at the end.

    UpdateContext({vVisitorTxt:Blank()})

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @marcgiag ,

    Based on the needs that you mentioned, I think a collection could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:

    1.JPG

     

    2.JPG

    Set the OnSelect property of the "+" Icon to following:

    Collect(NameEntry, TextInput1.Text);Reset(TextInput1)

     Set the Default Property of the Visitor Names (s) Text Box to following:

    If(
     EditForm1.Mode = FormMode.New, // EditForm1 represents the Edit form in your app
     Concat(NameEntry, Value & Char(10)),
     Parent.Default
    )

    Set the OnVisible property of current screen to following:

    Clear(NameEntry) // clear NameEntry collection

     

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards,

  • WarrenBelz Profile Picture
    156,380 Most Valuable Professional on at

    Hi @marcgiag ,

    I believe both suggestions have the ability to address you issue. Please accept the one that helps the most.

  • TheWizardShef Profile Picture
    4 on at

    Hello @WarrenBelz ,

     

    Thank you for your great instructions this is exactly what I was looking for.

     

    I have a couple of questions:

     

    1. Can this only be implemented out of the form area?
    2. I am having trouble finding where to place the last section of code.  I am using a canvas app on a SharePoint list and cannot find properties Save and Exit for the Screen.  Can you give me some pointers?

    Many thanks,

  • mistress3riple Profile Picture
    2 on at

    Hi,

    I want to achieve the similar thing but with two fields and also if I edit the existing record I want to append this to multi-text.

    So I tried with your solution and If I select existing record the correct previous data is in multi-text field but once I add something to textfield 1 and textfield 2 and click Add button this new data is not entered.

    OnSelect for button I add fields to collection:

    Collect(colApplication,{ID:I_AppID.Text,Name:I_AppName.Text})

     For Default in multi-text field I have

    If(
     SharePointForm1.Mode = FormMode.New, // I only have one form, defualt the powerapps creates
     Concat(colApplication,ID&"-"&Name&Char(10)),
     Parent.Default
    )

     

  • gerrysr6omfg Profile Picture
    37 on at

    Where did NameEntry come from?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 429 Most Valuable Professional

#2
11manish Profile Picture

11manish 191 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 122 Super User 2026 Season 2

Last 30 days Overall leaderboard