cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gazzo1967
Level 8

Inserting new created sharepoint list items into an Azure DB

HI All

I have a scenario which my organisation wants to send Powerapp data to Sharepoint and SQL DB.

They want to keep the features of using Sharepoint list such as Person/Group lookup etc but once the data has been submitted i need to copy the same information into a table on the SQL DB

 

I am fine when it comes to using sharepoit lists but SQL DB is new to me.

 

I have researched but can't find mush in the way of this functionality.

 

Any help would be great

Thanks Gary

6 REPLIES 6
gazzo1967
Level 8

Re: Inserting new created sharepoint list items into an Azure DB

is really as simple as 

When item created Insert row?

Super User
Super User

Re: Inserting new created sharepoint list items into an Azure DB

Hi @gazzo1967 

 

We need to set expectations first.

 

SharePoint Lists have some concepts that can be translated to database concepts. For example, some items in a list can be easily created into a table (string, numbers, etc.). Lookups can be translated roughly to relationships between tables, so if you want a "People Lookup," you need to create a reference to a table "People." 

 

Does this make sense? 

 

So to get data into an Azure SQL Database can be quite simple or pain in the behind depending on how well your SharePoint list are translatable to SQL.

 

Can you provide a sample of the SharePoint list so that I can help you further?

 

If you can't try the following:

  1. Create a stored procedure that inserts data into the table(s) that you want to save the data.
  2. Create a simple flow that calls that stored procedure once an item is created (you can use the modified to update the results)

 

small-Screenshot 2019-09-17 at 15.09.43.png

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

 

gazzo1967
Level 8

Re: Inserting new created sharepoint list items into an Azure DB

@manuelstgomes 

I assume that the people/group takes its information from the sharepoint user list?

i also have fields that populate via choice fields and one lookup

I kind of understand that i have to have a primary and a foriegn key to create the relationship.

This is not going to simple is it lol?

 

Gary

gazzo1967
Level 8

Re: Inserting new created sharepoint list items into an Azure DB

@manuelstgomes 

i know this would be a really 'hack' way to do it but would it not work by exporting to excel then sending to SQL?

Community Support Team
Community Support Team

Re: Inserting new created sharepoint list items into an Azure DB

 

Hi @gazzo1967 ,

 

Perhaps you can consider only recording key information in SQL DB.

For example, the Person field stored in the SharePoint list, you can consider inserting the Person email only in the SQL DB, because this is the unique info, but the most critical information, you can use it to do a lot of subsequent operations.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Super User
Super User

Re: Inserting new created sharepoint list items into an Azure DB

@Gaz_E sure if you prefer that could work. I don't recommend it because there's an extra step without any additional gain. Try moving it directly to the database. The flow is quite simple; you'd get a much more clean flow. My recommendation:

1. Make a list of the SharePoint's fields and types.

2. Check if you can make them all into strings, numbers, and dates.

3. If you can, dump everything as-is into the database in one fast and quick step :).

 

If you have to add more stuff to SharePoint, then it's just a question of adding that field to the database and map it in the flow. Simple and clean.. 

 

@v-bacao-msft has a point. Store only information that you need. You can fetch for the rest of the information later if you need it. 

 

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,400)