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 / Alternative to SQL tri...
Power Apps
Unanswered

Alternative to SQL trigger

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I wanted to use SQL trigger on my tables, but SQL connector doesn't allow it:

Insert and update to a table won't work if you defined a SQL server-side trigger on the table.

From : https://learn.microsoft.com/en-us/connectors/sql/#general-known-issues-and-limitations

 

Each of my table contain 3 triggers: insert, update and delete.

 

Now, I need to find an alternative to do what I want since, like I said, Power Apps doesn't allow table with triggers.

I saw that Power Automate contain an trigger called "When an item is modified (V2)", but it doesn't do what I need since I need to have the data before I updated the record and after I updated the record.

 

Here is an example of a trigger I need in SQL:

CREATE TRIGGER table_update_overloading
ON my_table
AFTER UPDATE
AS
BEGIN
INSERT INTO table_xxx (yyy)
    SELECT yyy FROM deleted
 
INSERT INTO table_xxx (yyy)
    SELECT yyy FROM inserted
END;
GO
 
 
But, for some other tables, my triggers are much more complicated, so I don't see how I can do an patch since it would be way too slow:
CREATE TRIGGER my_table
ON my_table
AFTER UPDATE
AS
BEGIN
INSERT INTO table_xxx (yyy)
SELECT yyy_1
FROM another_table_1
WHERE id in (
SELECT yyy_2
FROM another_table_2
WHERE id in (
SELECT another_table_3 FROM deleted
)
)
 
 
INSERT INTO table_xxx (yyy)
SELECT yyy_1
FROM another_table_1
WHERE idTacheTravail in (
SELECT yyy_2
FROM another_table_2
WHERE id in (
SELECT another_table_3 FROM inserted
)
)
END;
GO
 
Is there an alternative ?
Categories:
I have the same question (0)
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @Anonymous,

     

    Using a Power Automate flow that runs an Execute a SQL Query V2 or a Stored Procedure V2 action in order to create, update and delete records could do the trick. This would allow you to keep the Event Triggers within SQL instead of needing to move all of that logic to Power Automate.

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @LaurensM I cannot use Execute a SQL Query V2 since I use an on-premises SQL Server.

     

    For the Stored Procedure V2, this means I would need to create more than 30 flow in power automate which is absurd.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard