1

I have a Logic App that uses the "SQL Server - When an item is modified (V2)" trigger, monitoring an Azure SQL DB for updated rows. When running this LA, I noticed that the modified row that came as output for this trigger did NOT contain the updated data.

I thought this might be by design (don't really see why, but ok...) so I added a "Get Row" action directly after the trigger, to go fetch the most recent data for the row that triggered the LA. But even this step still returned the old, not-updated data for that row.

However, when I resubmit the run some seconds later, the "Get Row" action does get the updated data from the database.

Is this normal behavior? Is the SQL DB row version already updated even though the data update isn't committed yet, triggering the Logic App but not returning the updated data yet?

  • May I know if you can select your table in the `Table name` box ? I can't find any table in `Table name` box but I know there are tables in my sql server. – Hury Shen Aug 07 '20 at 08:22
  • Hury Shen, yes, I can select the table name. Apparently, if you can't, it's because you are missing a timestamp (for updated items) or an id column (for created items). The logic app triggers on update, so that not the issue... – Pieter Dubois Aug 09 '20 at 11:02

1 Answers1

0

Thanks for pointing me to add a timestamp to my table, I add the timestamp and then I can find the table in the selection. I test it in my side but the trigger works fine, it output the updated data. I provide my logic below for your reference:

My table show as:

enter image description here

My logic app:

enter image description here

Please note I disable the "Split On" in "Settings" of the trigger.

enter image description here enter image description here

After running the update sql:

update Table3 set name = 'hury1' where id  = 1;
update Table3 set name = 'jim1' where id  = 2;

I got the result (the variable updateItems in screenshot contains both updated items):

enter image description here

Hury Shen
  • 14,948
  • 1
  • 9
  • 18