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 / Verify a value, if it ...
Power Automate
Suggested Answer

Verify a value, if it exist in an Array

(0) ShareShare
ReportReport
Posted on by 2
Hi,
 
I have struggles with a function, which should check, if a value is already inside an array or not, and if it's not there, it should be added.
 
I have an array, with several columns (they are filled at the beginning of the flow from an sharepoint list).
I have as well an second array, which is empty.
 
I have a value "project-id", which could be several times inside the array (It's a list, where people can loan some stuff).
So, I guess, I can take the array, and check, if the value "project-id" is already inside the "filtered array" or not. If it's already inside, it should be done nothing, otherwise it should be added to the array. (The first item is added by default, because the second array is empty at the beginning).
 
I tried it with the function "Filtered Array", with several composed arrays, with the contains function etc. and nothing works as I need it.
 
I'm little bit lost now, how I could get a filtered list, where each Project is just one time inside the array.
 
My goal is, to create a reminder to the persons, who loan some stuff and bring them back on time.
 
The problem is as well, that I couldn't really recognize at the Flow-History, which value was compared with with value, if there is a format issue or there was taken a wrong value, etc.
At the Compare function for the Input area is just noted: 
 
{
"expressionResult": false
}
 
I checked some blog-article as well and tried it with this solutions, but without any success.
 
Does anybody have a really good solution or any hint, how I can solve this issue?
 
The best goal could be, that I can send an reminder to the person, who loan some stuff and get a short list, what they have loan and until when they should have to bring it back, etc,
All these data are insode the array.
The easiest way will be, to send for each article an own mail, but this could be annoying to the recipients...
 
Thanks and best regards,
Florian
Categories:
I have the same question (0)
  • Suggested answer
    Pstork1 Profile Picture
    69,127 Most Valuable Professional on at
    If you do a Filter Array action on the array where Project-ID is equal to the value you are looking for you can then check the length() of the output. If the length is greater than 0 then the array already contains the Project-ID. If its 0 then it doesn't.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard