cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NWEASD
Resolver I
Resolver I

Filtering off the OData__ModerationStatus

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

 

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

8 REPLIES 8
PrasadAthalye
Super User
Super User

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

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

This still fails.  

NWEASD_0-1636736951871.png

NWEASD_1-1636736958720.png

 

 

NWEASD
Resolver I
Resolver I

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

 

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
Resolver I
Resolver I

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
Resolver I
Resolver I

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
Resolver I
Resolver I

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
Resolver I
Resolver I

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.

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

AI Builder AMA June 7th carousel (up on May 25th, take down June 8th) (1).png

'Ask Microsoft Anything' about AI Builder!

The AI Builder team invite you to ask questions and provide helpful answers at our next AMA.

Users online (2,039)