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

Community site session details

Session Id :
Power Automate - Building Flows
Suggested answer

Detecting Duplicates

(1) ShareShare
ReportReport
Posted on by 71
I need help, I'm having a hard time understanding how to accomplish a seemingly simple flow. The overall concept of the task is to allow people to register vehicles and receive a permit, I want to prevent 2 permits being issued to the same vehicle. No DUPLICATES
I have 2 SharePoint list “IssuedPermits” list and “PendingPermits” list, each list contains owner and vehicle information such as the vehicle vin information. The vehicle vin information is what I’m using to check for duplicates.
I have a button in my power app that will trigger a flow that will send up to 20 vehicles information to power automate to begin the flow.
Step 1 & 2
Power Apps Trigger and ParseJSON
 
Step 2 & 3
Filter Array & VINNumber Select (Isolate VIN’s)

Initialize variable and get IssuedPermit list VIN info

Two Selects to clean up IssuedPermit list VINs for the search


This is where my problems and confusion begin.
 
The first Apply to each is the Body(‘Filter_array’)
Then I set the variable, then I get the IssuedPermits VIN numbers again to use in the next Apply to each, then my condition.
 From my understanding it should loop thru each VIN number and increment the variable.
 
Any ideas of where I’m going wrong?
 
I'm trying to do something similar to this.
 
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,029 Super User 2025 Season 2 on at
    Detecting Duplicates
    Hi,
     
     
     The flow could have been done in simpler way as described below
     
    1. Assume that from output of powerapps trigger and select action, you have stored the VIN numbers in an array format (from power apps) , for demo purposes, i am storing in array variable as shown below
     
     
     
    2. Now use apply to each to loop through each element present in array variable VINNumbersfromPowerApps as shown below
     
    Next steps would be explained will be under apply to each 
     
    3.1- use get items to get items from IssuedPermits SP List with using filter query which helps to check whether the VINNumber through which you are looping is present in Sharepoint list?
     
     
    3.2- Now use condition action to check whether there is any output from get items action as shown below
     

     
    Expression used- 
    length(outputs('Get_items')?['body/value'])
     
    Now in Yes branch- if the condition is True, it implies that duplicate element exists in the IssuePermit lis
     
     
    This is basic idea of how flow should be designed, i am thinking that you need to count total number of duplicate elements present, if not you want to do something if duplicate element is present - then under yes branch you can add respective actions.
     
    Hope it helps !
    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs
     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you!

     
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 655 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 371 Moderator

#3
chiaraalina Profile Picture

chiaraalina 276

Last 30 days Overall leaderboard