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 / Concatenate multiple t...
Power Apps
Unanswered

Concatenate multiple textinputs patch() and save it in one column in SQL

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Guys,

 

Is there a way to concatenate multiple text inputs in patch () And also in gallery1.selected function (in edit mode) and also save it in SQL in one column ? 

 

Please see attached.

 

In my scenario, the users will have more than 1 job steps so I want to concatenate all of them when patching and saving in one column in database table .

 

Any advice helps!!

concatenate.PNG
Categories:
I have the same question (0)
  • Dawidvh Profile Picture
    1,346 on at

    Hi @asdeev,

     

    Yes you can use anyone of the following:

    Patch(dataSourceName,record, {fieldToPatch : Concatenate(TextInput1.Text,",",TextInput2.Text)})
    Patch(dataSourceName,record, {fieldToPatch : TextInput1.Text & "," & TextInput2.Text})

    Let me know if you don't come right.

     

    twitter: @dawidvh

    youTube: https://www.youtube.com/channel/UCIMe_ErQZP5chbI9UyW0xLw

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Try saving the inputs in a variable first and then call the patch function.

    Set(ConcatenatedData, Concatenate(input1.Text, " ", input2.Text, " ", input3.Text)); Patch(EntityName, Defaults(EntityName),{'Combined Field Name': ConcatenatedData})
  • asdeev Profile Picture
    Microsoft Employee on at

    Hi Guys,

     

    thanks alot. This is great but when I try to get the data back in the edit mode of the form it doesnt come.

     

    On the default property of the TextInput7 I am saying

     

    If(!Exisitng, "1.", TextInput7.Text) --- When I use this formula it says "this rule creates circular reference to the property".

     

    What am I doing wrong?

     

    I want to show the filled information of the textboxes back when the user opens the form in edit mode.

     

    So thats why I am saying if its a new form then just show 1. if not show the value of the Textbox, I hope it makes sense?)

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Try setting the Default propetry of the text input to "1.". I don't think you need the if conditon.

  • asdeev Profile Picture
    Microsoft Employee on at

    @Anonymous

     

    I am able to submit the form and save the job steps in 1 coloumn in table. However, I want the defaulted job steps back when the users reopen the submitted form in edit mode.

     

    I want the information of textbox1 for example to be displayed when user reopens the form in edit form.

     

    Thats why I was using if statement, if(!Exisitng, "1.", If not then have the defaulted information of the textbox1)

     (which isnt working)

     

    Existing- is a name of the variable in my app . I use it to navigate from create form to edit form

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Move your if condition to the OnVisible of the the screen where the form is located.

  • asdeev Profile Picture
    Microsoft Employee on at

    I cannot do that I guess. I want to have defaults for all the textboxes when the form is in edit mode. (see picture)

     

    I tried by doing what you said but the default value of that textbox is still empty when I open the submitted form in edit mode .

     

    Please see attached.

    onvisible.PNG
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Why not add a label the left of each textbox and make the labels visible when !existing and hide the labels when existing?

  • asdeev Profile Picture
    Microsoft Employee on at

    @Anonymous

     I'll try and explain again. Not sure if I made sense earlier.

     

    After trying so many different ways I came up with this.

     

    I have a datacard called Job steps and I have 10 textinputs as shown below. (Also see pic for reference)

     

    textinput 1

    textinput2

    textinput3

    textinpit 4

    .

    .

    .

    .

    textinput10

     

    I want the textboxes to get back their default values when user opens the submitted form in edit mode.

     

    I used If(!Exisitng, "1.", First(Split(ThisItem.JobSteps,"|")).Result). -- - I am checking if it is not an existing form then have 1. in the textinput, if not (if its edit form) have the defaulted value that the user submitted when they created this form.

     

    Technically the above formula works for my First TextInput but how can I get back the other TextInput information?

     

    I tried the formula (See below) For the second textinput but I am not sure how to make this work.

     

    My patch function for this coloumn is 

    jobsteps: Concatenate(TextInput7.Text,"|", TextInput8.Text, "|", TextInput14.Text)

     

     My datasource is SQL and Jobsteps is one of the coloum in it.

     

     

    firstN.PNG

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard