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 / Check if a value exist...
Power Automate
Unanswered

Check if a value exist within a Select

(0) ShareShare
ReportReport
Posted on by 8

Hi.

 

I'm fairly new to power automate and I'm struggling with a good way to check if a value exist with in a Select.

osolbakk_0-1677829758576.png

 

I have a variable that I set to "123456789". Is there a way to check if this values is in "SAP_VENDOR_KEY" within the select? I can compare against SAP_VENDOR_KEY & VENDOR_NAME but not the one value alone. 

Hope someone can help me with this issue. 🙂

Categories:
I have the same question (0)
  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    @osolbakk  are you using Get Items action in your flow. In the Get Items output do you want to check if any items has Vendor ID which equals to the variable value? Also any reason why you are using Select action?

  • osolbakk Profile Picture
    8 on at

    I actually have two Get Items.

    osolbakk_2-1677831279154.png

     

     

    What I'm doing here is compare the two lost an check if there are any new ones in "Initial list"

    The filter array will compare the two select against each other and gives me new list items. It check if the combo of "SAP_VENDOR_KEY & VENDOR_NAME" exist. and if it don't it will add it to the master list.

     

    osolbakk_5-1677831648167.png

     

     

     

    But there might be a scenario where VENDOR_NAME has changed but SAP_VENDOR_KEY is the same. Then I want to update the list item with the new VENDOR_NAME instead. This check will be "over" the create list item..

     

    Not Correct... it is here I'm struggling 

    osolbakk_3-1677831450948.png

     

  • Verified answer
    annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    @osolbakk 

    1. In the apply to each action above Create Item action, add Filter Array action

    2. In this Filter Array, select output of master list Select action from Dynamic content

    3. On the left side input box of filter array use below expression from dynamic content

     

    item()['SAP_VENDOR_KEY']

     

    4. On the right side input box of filter array use below expression from dynamic content

     

    items('Apply_to_each')?['SAP_VENDOR_KEY']

     

    5. Select equals to from dropdown

    annajhaveri_0-1677833912822.png

     

    6. Then add condition action, use below expression on left input, select greater than from dropdown and on right side provide 0 value

     

    length(body('Filter_array_2'))

     

    annajhaveri_1-1677833999580.png

     

    7. In Yes branch of condition action, you can get the name of the vendor (the vendor name that has updated) using following expression in Compose action

     

    body('Filter_array_2')[0]['VENDOR_NAME']

     

    annajhaveri_2-1677834051970.png

     

    8. In No branch of condition action, you can move the Create Item action that you have currently. As the no branch of condition indicates that the Vendor with that ID doesn't exists in the master list.

     

    Screenshot of how your whole Apply to each action will look

    annajhaveri_3-1677834235636.png

     

     

  • osolbakk Profile Picture
    8 on at

    Thank you for the help. This solved my issue.. 😀

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard