cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Felipe
Level: Power Up

Trigger in Power Apps

Hello,

 

I have an application in power apps that connects to a BD SQL ONPREMISES through a gateway, all right, list and update the data.
Now I have created a trigger to detect the changes made by power apps, but I get error: "The requested operation is not valid." Server response: invalid mashup expression using supplied values. can not have triggers enabled if the statement contains an OUTPUT clause without an INTO clause. "
My trigger works very well from the SQL Query Analyzer.
Please support them to solve this problem.

7 REPLIES 7
Community Support Team
Community Support Team

Re: Trigger in Power Apps

Hi Felipe,

 

Please take this thread for a reference:
https://stackoverflow.com/questions/13198476/cannot-use-update-with-output-clause-when-a-trigger-is-...

 

The error you mentioned is explained in this blog, please also check it at here:
https://blogs.msdn.microsoft.com/sqlprogrammability/2008/07/11/update-with-output-clause-triggers-an...


Best regards,
Mabel Mao

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

Re: Trigger in Power Apps

How does this help the OP with his problem?

 

Just explain that powerapps does not support triggers due to the way it's implementend in powerapps/gateway. Just like the basic stuff as views and stored procedures..

Felipe
Level: Power Up

Re: Trigger in Power Apps

Hello Mabel
I had read enough about the OUTPUT clause, nowhere in my sentences is this.
Finally, rendered, to prove that it simply does not work in power apps, modify the trigger and just put a line with a simple

"Update myTable2 set STAT=@vEstado WHERE DOC=@Doc"
And it came out the same, with which I left doubts that it does not work.
I only have to create a JOB to review the changes and update other tables, a penalty for the time lag.
I hope you soon implement these features, it will be a success !.

Super User
Super User

Re: Trigger in Power Apps

you can get round the trigger issue.  create another table exactly the same, have powerapps update this table, then use a stored procedure to update the master table (call this stored procedure from powerapps using flow to run it).

 

A bit long winded but it works.  I have tables that are being used by external software that have triggers on so i have to use this method.

agneum
Level 8

Re: Trigger in Power Apps

This isn't user friendly or logical. This feature has been planner for like 3 years now?

Going to necro this post because it deserve attention.

 

ProNewbie
Level: Powered On

Re: Trigger in Power Apps

yes, would be great to have this feature

Gaëlle
Level 8

Re: Trigger in Power Apps

Hello @Delid4ve !
I'm really interested by your workaround ,especially on the flow triggered on an On-Prem SQL server.

How did you do that ? Because I know flow does not support a lot of onprem sql...
Is it all right, performance-wise ? Or does it make your application slower ?

 

I know this is not in Microsoft's policy to encourage On-Prem (they prefer users to buy licences and Cloud hosted datas), though I've sent a message in a bottle on that specific subject..If you could vote for it, that could be great !
https://powerusers.microsoft.com/t5/PowerApps-Ideas/Using-SQL-Trigger-on-On-Prem-where-PowerApps-upd...

 

Thanks !

Helpful resources

Announcements
SecondImage

Join our Live PowerApps Webinar

Tomorrow, September 24st at 10am PDT

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

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

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 321 members 5,074 guests
Please welcome our newest community members: