Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 8u4Hvs8+VwO2N8MErriscE
Copilot Studio - General
Answered

How to remove duplicated item from an array variable?

Like (0) ShareShare
ReportReport
Posted on 3 Apr 2024 11:32:30 by

With PA I get rows from an excel and store them in an array variable.
Now I need to obtain the array without duplicated items (I want just one occurrency of items), is there a simple way to do that?

Categories:
  • Verified answer
    Expiscornovus Profile Picture
    31,652 Most Valuable Professional on 03 Apr 2024 at 11:44:26
    Re: How to remove duplicated item from an array variable?

    Hi @theMac,

     

    You can use a union function for this.

     

    Below is an example

     

    union(variables('ArrayVar'),variables('ArrayVar'))

     

    unionfunction.png

     

    Below would be the result

     

    testresult_union.png

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started
Loading complete