Hello, in my current situation my only option is to use flow to insert, update and delete rows from a sql database.
My problem is in creating the flow for delete/update. Flow asks me for a table and a row id. I have a rowid column in my table, but i cannot select any table (there are no tables to select, they're all missing).
I would be grateful to know the problem which causes sql tables to be missing from creating these kind of flows from power apps to sql server.
Hi @danielmillion ,
Do you want to use MS Flow to delete/update rows from your SQL Table?
Have you defined a Primary Key within your SQL Table?
I have made a test on my side, and don't have the issue that you mentioned. Please check if you have defined a Primary Key within your SQL Table. If not, please define a Primary Key for your SQL Table, then try it again, check if the issue is solved.
If you do not define a Primary Key within your SQL Table, when you use "Delete row" action or "Update row" action of SQL Server connector within your flow, your SQL table would not be available within the Table name field.
It it an known limit within SQL Server connector, please check the following article:
https://docs.microsoft.com/en-us/connectors/sql/#known-issues-and-limitations
In addition, you could also consider delete or update rows from your SQL Table using PowerApps app. I have made a test on my side, please take a try with the following workaround:
If you want to delete rows from your SQL Table:
Remove( /* <-- Delete a specific record from your SQL Table */
'[dbo].[YourSQLTable]',
LookUp('[dbo].[YourSQLTable]', PrimaryKeyColumn = "A Specific Value") /* <-- Find the specific record you want to delete from your SQL Table */
)
RemoveIf( /* <-- Bulk delete records (which match the specific condition) from your SQL Table */ '[dbo].[YourSQLTable]', FilteredColumn = "A specific value" )
If you want to update an existing row within your SQL Table:
Patch( '[dbo].[YourSQLTable]', LookUp('[dbo].[YourSQLTable]', PrimaryKeyColumn = "A Specific Value"),
{
Column1: "xxxx", /* the Column1, Column2, ... represents the columns you want to update within your SQL Table */
Column2: "xxxx",
...
} )
More details about the Patch function, Remove function in PowerApps, please check the following article:
Best regards,
Thanks for posting in the community @danielmillion - can you review the above reply and update the thread if it was helpful?
Thank you,
@Anonymous
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
192 | |
69 | |
50 | |
38 | |
29 |
User | Count |
---|---|
246 | |
112 | |
92 | |
91 | |
71 |