web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :

Using the 'When an Item is modified' trigger with Azure SQL DB

PaulD1 Profile Picture Posted by PaulD1 2,914

I've recenly been working with Flow's 'When an Item is modified' trigger for Azure SQL DB, and thought I'd share some learnings.

Pre-requisites, how it works, peformance suggestions and some considerations and pitfalls to avoid.

Categories:

Comments

  • waleedmohd Profile Picture waleedmohd
    Posted at
    Using the 'When an Item is modified' trigger with Azure SQL DB

    Thanks, Solved.

  • dc7669 Profile Picture dc7669 152
    Posted at
    Using the 'When an Item is modified' trigger with Azure SQL DB

    Hi PaulD1,

     

    THANKS for the explanation!! 

     

    The RowVersion in the SQL table was my problem that this trigger was NOT working. 

     

    dchan1 

  • PaulD1 Profile Picture PaulD1 2,914
    Posted at
    Using the 'When an Item is modified' trigger with Azure SQL DB

    Not sure why you are not seeing the Index folder - maybe check you are on the latest SSMS?

     

    To create an index on the RowVersion column you can run a statement like the one below (replace schema, table and RowVersionCol with the appropriate schema name, table name and name of your RowVersionColumn).

     

    CREATE INDEX schema.idx_table_RowVersionCol
    ON schema.table
    (
    RowVersionCol
    )
    GO

  • PaulD1 Profile Picture PaulD1 2,914
    Posted at
    Using the 'When an Item is modified' trigger with Azure SQL DB

    Yep, the whole row is returned - the check is just 'has the record changed' which is based simply on the RowVersion number - are there any RowVersion numbers higher than the last time the Flow checked.

    If you want to know what has changed, you may want to look at making the table a 'temporal table' and creating a stored proc that, given the record ID, can compare the current with the prior record and tell you what has changed.

  • LencoTB Profile Picture LencoTB
    Posted at
    Using the 'When an Item is modified' trigger with Azure SQL DB

    How do you get the data from only those columns that have been modified? It seem to return to whole row.

  • LencoTB Profile Picture LencoTB
    Posted at
    Using the 'When an Item is modified' trigger with Azure SQL DB

    Great video. Just a question. I am using Azure SQL and I can't see Indexes folder just as you can in the video. When checking for the Top Queries I see that the it uses Clustered Index Scan on the whole row. I am not sure if this is okay or how to create an index just for the RowVersion column