cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
asdeev
Level: Powered On

concatenate multiple text inputs in the App and patch() into one column in sql

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!!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: concatenate multiple text inputs in the App and patch() into one column in sql

Hi @asdeev,

I like to use IsBlank(Parent.Default) to test whether a form is in New mode. In your case, I would put the following in the Update property of the datacard in the Edit form

If(IsBlank(Parent.Default), 1, Parent.Default)
4 REPLIES 4
AndySid
Level 8

Re: concatenate multiple text inputs in the App and patch() into one column in sql

Hi, I answeed this in your other post, here it is in case ou missed it...

 

on a label Text called myCombined

Concatenate(Label1.Text, ", ",  Label2.Text, ", ", Label3.Text & ", Gallery Selected = " &  Gallery1.Selected.Unit)

now patch:

Patch(Units,Defaults(Units),{Unit:myCombined.Text})

Results in a new record in table "Units" for Column "Unit" with the value of:

"A, B, C, Gallery Selected = Hrs"

 

Does this help?

Community Support Team
Community Support Team

Re: concatenate multiple text inputs in the App and patch() into one column in sql

Hi @asdeev ,

Can you share a bit more about your issue ?

By your saying “concatenate multiple text inputs in patch() and also in gallery1.selected function, do you want to save the string that concatenate multiple text inputs from the edit form with patch function ?

 

If I understand your issue correctly , I have made a test.

I created a sharepoint list named ‘test1’and a SQL table named  ‘table1’

15.png

Set Items property of the gallery1 to: test1.

 

Set Item property of the Edit Form to: Gallery1.Selected

Set OnSelect property of the button to :

Patch('[dbo].[table1]',LookUp('[dbo].[table1]',ID=1),{name:Concatenate(DataCardValue1.Text,",",DataCardValue2.Text,",",DataCardValue3.Text)})

Regards,

Eason

 

 

Community Support Team _ Eason YU
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
asdeev
Level: Powered On

Re: concatenate multiple text inputs in the App and patch() into one column in sql

Hi Guys,

 

thanks alot for your help!. 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?)

Super User
Super User

Re: concatenate multiple text inputs in the App and patch() into one column in sql

Hi @asdeev,

I like to use IsBlank(Parent.Default) to test whether a form is in New mode. In your case, I would put the following in the Update property of the datacard in the Edit form

If(IsBlank(Parent.Default), 1, Parent.Default)

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 26 members 3,854 guests
Recent signins:
Please welcome our newest community members: