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 / Unable to filter array...
Power Automate
Answered

Unable to filter array after select action

(1) ShareShare
ReportReport
Posted on by 727 Super User 2025 Season 2
Hello -
 
I've used the filter array action with success before but I'm just not able to figure out this one.
I want to filter to just store number 3 and its price records after the Select action.
 
This does not work.
 
 
 
Any suggestions?
 
 
Select action output screen shot and snippet of output text below ...
 
 
 
Snippet of output ...
[
  {
    "StoreNumber": "1",
    "prices": [
      {
        "storePrice": 3.99,
        "quantity": 1,
        "startDateTime": "2024-03-18T00:00:00-04:00",
        "effectiveDateTime": "2024-03-18T00:00:00-04:00",
        "endDateTime": "9999-12-31T23:59:59.9999999+00:00",
        "effectiveEndDateTime": "9999-12-31T23:59:59.9999999+00:00"
      },
      {
        "storePrice": 4.49,
        "quantity": 1,
        "startDateTime": "2023-06-05T00:00:00-04:00",
        "effectiveDateTime": "2023-06-05T00:00:00-04:00",
        "endDateTime": "2024-03-17T23:59:59.9999999-04:00",
        "effectiveEndDateTime": "2024-03-17T23:59:59.9999999-04:00"
      }
    ]
  },
  {
    "StoreNumber": "3",
    "prices": [
      {
        "storePrice": 3.99,
        "quantity": 1,
        "startDateTime": "2025-03-01T00:00:00-05:00",
        "effectiveDateTime": "2025-03-01T00:00:00-05:00",
        "endDateTime": "9999-12-31T23:59:59.9999999+00:00",
        "effectiveEndDateTime": "9999-12-31T23:59:59.9999999+00:00"
      },
      {
        "storePrice": 3.45,
        "quantity": 1,
        "startDateTime": "2025-01-01T00:00:00-05:00",
        "effectiveDateTime": "2025-01-01T00:00:00-05:00",
        "endDateTime": "2025-02-28T23:59:59.9999999-05:00",
        "effectiveEndDateTime": "2025-02-28T23:59:59.9999999-05:00"
      },
      {
        "storePrice": 3.99,
        "quantity": 1,
        "startDateTime": "2024-03-18T00:00:00-04:00",
        "effectiveDateTime": "2024-03-18T00:00:00-04:00",
        "endDateTime": "2024-12-31T23:59:59.9999999-05:00",
        "effectiveEndDateTime": "2024-12-31T23:59:59.9999999-05:00"
      },
      {
        "storePrice": 4.49,
        "quantity": 1,
        "startDateTime": "2023-06-05T00:00:00-04:00",
        "effectiveDateTime": "2023-06-05T00:00:00-04:00",
        "endDateTime": "2024-03-17T23:59:59.9999999-04:00",
        "effectiveEndDateTime": "2024-03-17T23:59:59.9999999-04:00"
      }
    ]
  },
  {
    "StoreNumber": "4",
    "prices": [
      {
        "storePrice": 3.99,
        "quantity": 1,
        "startDateTime": "2024-03-18T00:00:00-04:00",
        "effectiveDateTime": "2024-03-18T00:00:00-04:00",
        "endDateTime": "9999-12-31T23:59:59.9999999+00:00",
        "effectiveEndDateTime": "9999-12-31T23:59:59.9999999+00:00"
      },
      {
        "storePrice": 4.49,
        "quantity": 1,
        "startDateTime": "2023-06-05T00:00:00-04:00",
        "effectiveDateTime": "2023-06-05T00:00:00-04:00",
        "endDateTime": "2024-03-17T23:59:59.9999999-04:00",
        "effectiveEndDateTime": "2024-03-17T23:59:59.9999999-04:00"
      }
    ]
  },
 
Thanks!
Categories:
I have the same question (0)
  • Suggested answer
    bscarlavai33 Profile Picture
    752 Super User 2025 Season 2 on at
    Use the expression item()['StoreNumber'] instead of just StoreNumber in your Filter Query. That should work.
  • Cgangweg01 Profile Picture
    727 Super User 2025 Season 2 on at
    Hello @bscarlavai33 
     
    Thank you for the reply post.
     
    I tried your suggestion, and it didn't work. I tried a few variations with the ? in the expression and changing case of the storenumber string based on something that I see before the select action but still nothing works.
     
    Below is what I attempted.
    Any suggestion now?
     
    Appreciate it!
     
     
     
  • Verified answer
    HJL Profile Picture
    9 on at
    Looks like StoreNumber is actually stored as a string. Try this:
    int(item()?['StoreNumber'])
  • Cgangweg01 Profile Picture
    727 Super User 2025 Season 2 on at
    Hello!
     
     
    Thank you both so much. This worked, int(item()?['StoreNumber']. Why did it work? Does it change the field I'm querying for into an integer?
     
    Next, I need to figure out how to filter for specific prices for the store in the result below? Probably by dates equal to something or not equal to something.
     
    Anyway ... have you noticed something wrong with notifications with this community site? I never got a notification of your reply post HJL nor do I get notifications to other people's posts that I subscribe to. Becoming less valuable.
     
     
     
    {
        "body": [
            {
                "StoreNumber": "3",
                "prices": [
                    {
                        "storePrice": 3.99,
                        "quantity": 1,
                        "startDateTime": "2025-03-01T00:00:00-05:00",
                        "effectiveDateTime": "2025-03-01T00:00:00-05:00",
                        "endDateTime": "9999-12-31T23:59:59.9999999+00:00",
                        "effectiveEndDateTime": "9999-12-31T23:59:59.9999999+00:00"
                    },
                    {
                        "storePrice": 3.45,
                        "quantity": 1,
                        "startDateTime": "2025-01-01T00:00:00-05:00",
                        "effectiveDateTime": "2025-01-01T00:00:00-05:00",
                        "endDateTime": "2025-02-28T23:59:59.9999999-05:00",
                        "effectiveEndDateTime": "2025-02-28T23:59:59.9999999-05:00"
                    },
                    {
                        "storePrice": 3.99,
                        "quantity": 1,
                        "startDateTime": "2024-03-18T00:00:00-04:00",
                        "effectiveDateTime": "2024-03-18T00:00:00-04:00",
                        "endDateTime": "2024-12-31T23:59:59.9999999-05:00",
                        "effectiveEndDateTime": "2024-12-31T23:59:59.9999999-05:00"
                    },
                    {
                        "storePrice": 4.49,
                        "quantity": 1,
                        "startDateTime": "2023-06-05T00:00:00-04:00",
                        "effectiveDateTime": "2023-06-05T00:00:00-04:00",
                        "endDateTime": "2024-03-17T23:59:59.9999999-04:00",
                        "effectiveEndDateTime": "2024-03-17T23:59:59.9999999-04:00"
                    }
                ]
            }
        ]
    }
     
     

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard