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 :
Power Platform Community / Forums / Power Automate / Dont add row to excel ...
Power Automate
Unanswered

Dont add row to excel table if allready excist

(0) ShareShare
ReportReport
Posted on by

Im trying to list all unique users of a couple of teams to one excel file. But because users can excist in multiple teams I don't want duplicates. 

 

I initialized a global array varible where I can store the users ID's

When looping through the users, I check if the array allready contains this user ID, otherwise I add it to the array and write it to my excel file.

 

But something is going wrong. The duplicates still end up in my file. (I made sure the excel table is empty at the start of the flow)

 

dont add row if excists.PNG

 

Categories:
I have the same question (0)
  • Verified answer
    efialttes Profile Picture
    14,756 on at

    Hi!

    My sugestion is, to replace dynamic content currently assigned on the right side of your Condition rule, and assign the following expression instead:

    item()?['id']

     

    I would also suggest to apply the same replacement in your 'Append to array variable', and probably also in your Excel action block

     

    Not with my laptop, could not test it yet

    Hope this helps

  • Community Power Platform Member Profile Picture
    on at

    Thanks! Don't know why, but that did the trick!

  • efialttes Profile Picture
    14,756 on at

    Hi!

    Glad to help!

     

    The reason is, you are iterating with an Apply to Each. Your 'Apply to each' input is 'Get members' output, which is an array whose elements are objects, each object representing one member of the group with several properties. One of the properties is the 'id'.

     

    Now, when iterating inside an 'Apply to each', current iteration can be represented by means of item() or items('Name_of_your_apply_to_ech'). item() is faster to type... but it will not represent anymore 'Apply to Each' current iteration if you are adding inputs to a 'Filter Array' or 'Select' inside your 'Apply to each'.

     

    Hope this helps

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard