cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Dumitru
Regular Visitor

Insert data in SQL tables without Form

Hi everyone ... Then I have a problem. I have to create an application that takes data from different databases (MSSQL) and send this data to new tables in another DB (MSSQL). How can this be done without the form? I tried to do it with the Patch function but it gives me an error.These data are all taken from different databases and do not fit into a form. And I would like to pass them to a different table from where I took them.Someone can help me. ThanksCattura.PNG

3 REPLIES 3

Re: Insert data in SQL tables without Form

Hello,

 

The Patch function is the way to go. What error did you get?

 

You need to have a primary key in your table to get Patch to work.

Dumitru
Regular Visitor

Re: Insert data in SQL tables without Form

The name is not valid. Identifier not recognized.

Cattura.PNGThis is my empty table.where I want to transfer the data

Cattura1.PNGERROR: The name is not valid. Identifier not recognized

Thanks!!!

Community Support
Community Support

Re: Insert data in SQL tables without Form

Hi @Dumitru 

 

Could you please share more of your dropdown control's formula expression?

Do you want to patch the Dropdown selected value to your SQL table?

More information:

function-patch

 

For example I test as next:

Dropdown2.Items=["m","n","o","p"]

Button1.OnSelect=Patch('[dbo].[Tab_2019Test1]',Defaults('[dbo].[Tab_2019Test1]'),{ID:Value(TextInput1.Text),Nam:Dropdown2.Selected.Value})

 

(the green color ones are sql table name,control column name on my side, you can change to yours on your side,ID is the PK in my sql table)

 

Button.PNG

 

patch.gif

 

Best Regards.

Yumia

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Users online (6,234)