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 / Filtering off the ODat...
Power Automate
Unanswered

Filtering off the OData__ModerationStatus

(0) ShareShare
ReportReport
Posted on by 174

I am trying to filter a sharepoint list based on the Approval Status.  I confirmed that the flow is running when I do not filter on the Approval Status.  When I ass the OData__ModerationStatus eq 'Pending' (or '2') it fails.  Any thoughts on how to make this work?  

 

NWEASD_0-1636728471915.pngNWEASD_1-1636728483701.png

 

Categories:
I have the same question (0)
  • PrasadAthalye Profile Picture
    on at

    I tested using GetItems and it worked fine. Refer below. The field is of type integer. Can you remove single quotes around the value 2 and test?

     

    PrasadAthalye_0-1636736498018.png

     

  • NWEASD Profile Picture
    174 on at

    This still fails.  

    NWEASD_0-1636736951871.png

    NWEASD_1-1636736958720.png

     

     

  • NWEASD Profile Picture
    174 on at

    I have given up on trying to filter by the ModerationStatus.  Now when I go to paging and try to get it to pull more than 100 records to run in the apply to each loop I am getting an missing required property.  I am not sure where this came from.  Any thoughts on this?

    NWEASD_0-1637075318934.png

     

  • Verified answer
    v-LilyW-msft Profile Picture
    on at

    Hi @NWEASD 

    Has your problem been solved?

    Is your 'OData__ModerationStatus' column a choice type?

    I test on my side with the filter below and it can works well.

    You can try it again with the filter below.

    Created le '2021-11-16' and OData__ModerationStatus eq 'Pending'

    vLilyWmsft_0-1637131952977.png

    vLilyWmsft_2-1637132493435.png

    Regarding this error, please check if there is a blank value in your EndDate column.

    If yes, please review the items in the list and fill that blank field and try again.

    vLilyWmsft_1-1637132272244.png

    Hope the content above may help you.

    Best Regards

  • NWEASD Profile Picture
    174 on at

    So I will try the OData__ModerationStatus again.  I am not sure of the column type of this as I am trying to reference the current status of an approval item.  Basically, I do not care about pulling anything that has an Approved Status.  

     

    As far as the EndDate issue I am seeing, I do not have a column on the sharepoint list that is called EndDate.  I have an End Time and that is required for every item on the list to have.  There should not be an item on the list that does not have an End Time value.

     

  • NWEASD Profile Picture
    174 on at

    Update on this.  I was able to get the OData__ModerationStatus to filter.  Thankfully.  Now the problem that I am running into is the EndDate issue.  I am not sure why.  I only get this issue when I am trying to use the "End Time" column and I pull more than 1 record in the get items.  I confirmed that the column has the correct information in it when I pull that 1 record.

  • NWEASD Profile Picture
    174 on at

    To give you a picture update of what is happening.

     

    It seems like the item it is pulling has a null end time.  When I open that item, it is showing the correct end time.  Not sure why it is acting that way.

    NWEASD_0-1637251920431.png

    NWEASD_1-1637251967485.png

     

  • NWEASD Profile Picture
    174 on at

    Not sure why the 1 item supposedly does not have an end time but I just configured a run-on failure and it worked and got me the information I needed.  Thanks for your help on this.

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