web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate OData Q...
Power Automate
Unanswered

Power Automate OData Query Woes

(0) ShareShare
ReportReport
Posted on by 282

My task was to find all records (files) from a document library with error conditions. Ideally, I'd love to access "Missing Info," a column in the System View "Files that need attention." Given that I can't, I decided to query each field with a null value.

 

For my purposes, it doesn't matter whether I use "Get Items" or "Get file (properties only)" since I'm just reporting and emailing. The Odata query is the same.

 

All conditions need to look for FSObjType='0' for Files. (Folders aren't relevant to my query--they have null values in these fields.)

So my first tries at Query Strings look like this:

((FSObjType eq '0') and (CourseTitle eq null)) or ((FSObjType eq '0') and (FiscalYear eq null)) or ((FSObjType eq '0') and (EndDate eq null)) or ((FSObjType eq '0') and (StartDate eq null)) or ((FSObjType eq '0') and (CPE eq null)) or ((FSObjType eq '0') and (GovCPE eq null))

The problem is that I only get two results.

 

If I look at just CourseTitle being null, I get the results matching the entries in "Files that need attention."  This query makes sense because when the user uploads a document and doesn't enter the required fields, the CourseTitle and other fields are also null.

 

((FSObjType eq '0') and (CourseTitle eq null))

 

My question is, why does the query start limiting on other "or" conditions.

 

Also, the editor is not helpful on complex conditions.

 

Categories:
  • v-mingkz-msft Profile Picture
    Microsoft Employee on at

    Hi @sonisick,

    Do you want to get only files in document and one of other columns is null?

    Could you please show some screenshots about your get files(properties only) action and your sharepoint library?

    Maybe you can try the following expression in Filter query.

    FSObjType eq '0' and (CourseTitle eq null or FiscalYear eq null or EndDate eq null or StartDate eq null or CPE eq null or GovCPE eq null)

     

    Best Regards,

    Kyrie

  • sonisick Profile Picture
    282 on at

    Thanks I'll try the combination.

  • sonisick Profile Picture
    282 on at

    No, I got zero items back using your query. There are six items out there an this gets them:

    ((FSObjType eq '0') and (CourseTitle eq null))

     

    I can't include other fields.

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard