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

Community site session details

Session Id : f9tqh54praokGd6O6PHL20
Power Apps - Building Power Apps
Unanswered

Button to add Text input into Text field

Like (0) ShareShare
ReportReport
Posted on 23 Aug 2023 12:02:36 by 26

Hi Everyone,

 

I am building a ticketing system with sharepoint list and a modified form with powerapps.

I have a text field "comment" where people who resolve the issue will write on it comments about the ticket.

This field will be in read only (I know how to do it). I would like to have another text input with a button "add".

If you click on the add button it will put your name, the date, take the text you wrote and put it in the "comment" field and finally go to the line for the next one who will add another comment.

 

I hope this is clear enough, I had a drawing of what I am trying to do.

Thank you for your help and your time.

Best Regards,

  • madlad Profile Picture
    2,637 Moderator on 24 Aug 2023 at 12:19:42
    Re: Button to add Text input into Text field

    Before you get to the form, how do you choose which item you want to edit?

    Is it a gallery, dropdown, ect? This will change a few things.

    If possible, could you perhaps send a screenshot of these? That would be the best for knowing what's going on.

     

    Let me know!

  • AutomationFlows Profile Picture
    26 on 24 Aug 2023 at 05:26:52
    Re: Button to add Text input into Text field

    Hello 🙂

    Yes exactly this is a form to only edit item in my sharepoint list.

    There is no creation because this is coming from a Microsoft Forms with a flow.

     

    Ok so if my input "Comments" is in a datacard this should be this below ?

    Set(varComments, DataCardValue10.Selected.comment)

    Also the '.comment' does not exist on my site. Is this '.text' or maybe '.value' ?

     

    Thanks for your help.

    Best Regards,

  • madlad Profile Picture
    2,637 Moderator on 23 Aug 2023 at 14:27:34
    Re: Button to add Text input into Text field

    No worries!

     

    To start, as I understand, you are using an edit form to save the comments to your datasource.

    are you using this only to create new records, or to update records, or both?

    Let me know if I'm misunderstanding here.

     

    If you are using it to edit, you must have an item that you are editing, which is what I intended with *SelectedItem*, just replace this with the appropriate item selection. 

    For example, if you're selecting an item to edit from a gallery, you might use 

    Set(varComments, *Gallery*.Selected.comment)

    in the galleries OnSelect property, and using the galleries name.

    This pattern could follow for whatever way you're choosing an item to edit. Let me know if you need any more info on this if you're editing existing records.

     

    If you're only using this form for new comments, you can disregard that code - it won't be needed.

     

    Let me know!

  • AutomationFlows Profile Picture
    26 on 23 Aug 2023 at 14:08:03
    Re: Button to add Text input into Text field

    Hello,

     

    Does it will save the value in my Comments field when we click on save ?

     

    I have tried to initialize the variable with this below but I am struggling with this.

    Set(varComments, *SelectedItem*.comment)

     

    Where am I supposed to type this ? on "OnEdit" ? what do you mean by *SelectedItem*.comment ?

     

    Sorry I am a begginer with this tool.

  • madlad Profile Picture
    2,637 Moderator on 23 Aug 2023 at 12:21:52
    Re: Button to add Text input into Text field

    Hi!

     

    I think for this your best bet is to use a variable here. I'm assuming that, since multiple people will be editing it, that the form will be in edit mode most of the time.

    When you choose the record to edit, you can do something like:

     

    Set(varComments, *SelectedItem*.comment)

     

     

    Then, when people have a comment to add, you can do something like:

     

    Set(varComments, varComments & " 
    " & User().FullName & " - " & Now() & ": " & TextInput1.Text)

     

     

    Finally, set the text of your label to be varComments. This should display the data as you described.

     

    Hope this helps!

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete