Skip to main content

Notifications

Power Automate - General Discussion
Answered

Filter GetItems Dates stored in a Text column

(0) ShareShare
ReportReport
Posted on by 163

Hi

 

I have a column in an SP list that is set to text, but holds date values, and I need to filter that column to get any items from the last week, however it is returning all sorts of items instead. Are there anyways to do this as my current option doesnt seem to work. Below is my current Filters:

I am setting a variable to get the date 1 week ago:

addDays(utcNow(),-7,'yyyy-MM-dd')

lalford09_0-1713782742857.png

 

I then filter on the GetItems:

PageStatus eq 'Fully Approved' and FinanceApproverApprovedDate ge@{variables('var_DateFilter')} ' and field_1 eq 'TEST'

lalford09_0-1713783037530.png

 

 

 

  • ManishSolanki Profile Picture
    ManishSolanki 15,075 on at
    Re: Filter GetItems Dates stored in a Text column

    Here is the list of differences in the filter query syntax:

     

    1. There was no blank space between ge and variable.

    2. The variable was not wrapped inside single quotes.

    3. There was extra blank space before the end single quote in the variable expression.

     

    I have highlighted the diffrecensc in red color:

    PageStatus eq 'Fully Approved' and FinanceApproverApprovedDate ge@{variables('var_DateFilter')} ' and field_1 eq 'TEST'

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • lalford09 Profile Picture
    lalford09 163 on at
    Re: Filter GetItems Dates stored in a Text column

    Hi @ManishSolanki 

     

    Works perfectly, thank you! Although it looks identical to mine, whats the difference?

  • Verified answer
    ManishSolanki Profile Picture
    ManishSolanki 15,075 on at
    Re: Filter GetItems Dates stored in a Text column

    Hi @lalford09 

     

    Pls try the below filter query:

    PageStatus eq 'Fully Approved' and FinanceApproverApprovedDate ge @'{variables('var_DateFilter')}' and field_1 eq 'TEST'

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard