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 / Filter Array not funct...
Power Automate
Unanswered

Filter Array not functioning correctly

(0) ShareShare
ReportReport
Posted on by 14

I currently have a flow that will send out List Item variables weekly. When a new list item is created for the prior week, could be 1 or more, a flow is ran that will pull all values from the sharepoint list. The filter array will then review the field Created on the sharepoint list variable and review for the matching filter array condition. See Below. 

 

FKarluk_0-1645025942234.png

 

Up till this week, this was working just fine, but now has stopped. Screenshots below will show what i get now as compared to what i use to get

 

FKarluk_1-1645026047008.png 

FKarluk_2-1645026152995.png

Apologies for the black markings, i needed to removed company information. But as you see, the data use to have a output and no longer does. Not sure the change as i didnt change anything. 

 

Categories:
I have the same question (0)
  • Mister_Shaik Profile Picture
    1,008 on at

    Hi @FKarluk ,

     

    Have you checked if there are any items that were created during last 7 days in that list?

     

    The output is expected to change, as you are applying to get only last 7 days of items. It might just be that no one has created any items last week?

     

    Please let me know if this is the case, or it's something else.

     

    Hope this helps 🙂


    Kind Regards,

    Shaik Sha
    ________________________________________________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • FKarluk Profile Picture
    14 on at

    Yes. I have checked. I created test items myself to confirm

  • Mister_Shaik Profile Picture
    1,008 on at

    Hi @FKarluk ,

     

    Why don't you add a filter condition to the get items itself?

    Created ge '@{addDays(utcNow(), -7)}'

     

    Then you can check what's going wrong down the line

     

    Regards,

    Shaik Sha

  • FKarluk Profile Picture
    14 on at

    By doing this, it did return data but now my variable array now display erroneous data. The variable i have parses through the information to provide specific data in a html table format. This made it worse. It displays data but the data it displays now is not readable. 

     

    FKarluk_0-1645148811271.png

    It should display like this

     

    FKarluk_1-1645148858375.png

     

  • Mister_Shaik Profile Picture
    1,008 on at

    Hi @FKarluk ,

     

    That's the raw data from the SharePoint list. If you want to select a specific columns with specific formatting, you can use a Select statement before you use it in other actions.

     

    If you notice from your screenshots, the output of the Filter is same as the output now you're getting from GetItems.

     

    By using select statement, you can both parse the data and give them new column names.

     

    Kind Regards,

    Shaik Sha

     

  • FKarluk Profile Picture
    14 on at

    When i remove the filter array to just use the select statement, i get an error stating the From needs to be an array. Im sorry, im very new to this and had this set a certain way and it was working. Now its not randomly 

     

    FKarluk_0-1645210577513.png

     

    What should i put before my select statement so the From in the statement could be a array. 

     

    FKarluk_1-1645210632159.png

     

  • Mister_Shaik Profile Picture
    1,008 on at

    In your select statement - The From field should be set to value not Body 

     

     

    Mister_Shaik_0-1645211362066.png

     

     

  • FKarluk Profile Picture
    14 on at

    Making great headway here but now comes the next issue. With the filter in the Get Items,  "Created ge '@{addDays(utcNow(), -7, 'yyyy-MM-dd')}'" its pulling data from last week and this week. When this flow runs, it should only the prior weeks data. Not to include this weeks. So if this flow runs monday, it should only show data 02/7 through 02/11.

  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @FKarluk 

    You need to include another filter using a lt or le operator.  You can chain filters with an "and".

    In effect you want to create a date range rath than just saying all items greater than or equal to a specified date.

    Here is a link for more info on OData filters

  • Mister_Shaik Profile Picture
    1,008 on at

    Hi @FKarluk 

     

    As @ScottShearer  suggested, you need to use additional filters in combination to get the required filter. 

     

    In case your requirement is to get last weeks reports, no matter when the flow is running during the current week, then you can use something like below,

     

    Created ge '@{addDays(utcNow(), sub(0,add(7,dayOfWeek(utcNow()))),'yyyy-MM-dd')}' and Created le '@{addDays(utcNow(), sub(0,dayOfWeek(utcNow())), 'yyyy-MM-dd')}'

     

    This is equivalent to "Created > startOfLastWeek and Created < startOfCurrentWeek"

     

    Hope this helps 🙂


    Kind Regards,

    Shaik Sha
    ________________________________________________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

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