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 Automate / SQL View To Sharepoint...
Power Automate
Answered

SQL View To Sharepoint List

(1) ShareShare
ReportReport
Posted on by 153
 I have the following flow which i need some assistance with.
 
I am pulling Employee Holiday data from a SQL View (which is joining 3 tables to give me the relevant date) i cant use the SQL Trigger for new item or update item as this doesnt work via On-Premise Gateway.
 
So currently the flow runs every hour Recurring Trigger, and picks up any new entries and populates these into a Sharepoint list... Sharepoint list has a column called sqlid & adsence_id is the primary key in the sql table.
 
My issue is, if a holiday request is deleted, or amended this creates a new absence_id, so i want to be able to delete the old absence_id which will no longer show in the SQL View, but is present in the Sharepoint Table...
 
Any advice much appreciated for best approach.
 
 
 
 
Categories:
I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,960 Moderator on at
    Hi
     
    I would
     
    1. Get your Items from SQL
    2. Use a Select to only grab the ID you want to verify exists in SharePoint
    3. Get your items from SharePoint
    4. loop through themn
    5. Do a filter on #2, the List of only ID's to see if your current Loop of the SharePoint list, has a matching one in the Unique SQL ID List
    If not then delete it
    if so ignore it
     
    The way you are doing it is backwards in your loop because the ones in the SQL Get Items should be in the LIst, or will be once you add it.
    But you want to verify if the LIst ID exists in the SQL.
     
    So, backwards for what you asked for.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 286

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard