Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Answered

Power automate flow - ODATA filter

(0) ShareShare
ReportReport
Posted on by 5

Hi, 

I'm trying to create Flow in Power Automate for Business Central but every time I try to use Find Data (v3) to filter, filters are not working. 

I've watched most of tutorials, read documentation for OData in BC and every time I receive an error "Could not find a property name" and have no other idea what else to change. Without filtering flow works correct.  

What I'm trying to do is to get Purchase Invoice Lines in Type= Comment and Description containing "order". 

pastedimage1685351177787v2.png

Error: 

Raw input:

{
    "host": {
        "connectionReferenceName""shared_dynamicssmbsaas",
        "operationId""GetItemsV3"
    },
    "parameters": {
        "bcenvironment""<environment name>",
        "company""<company name>",
        "dataset""v2.0",
        "table""purchaseInvoiceLines",
        "$filter""contains(Description, 'Order') and Document_No eq 'N200230026' and Type eq 'Comment'"
    }
}
I've encounter the same error while filtering PO attachments (I can send all existing attachments by email, but I cannot filter them by Document No. with the same error. 

  • Ewa10000 Profile Picture
    Ewa10000 5 on at
    RE: Power automate flow - ODATA filter

    Thank you, that solved all of the issues :)

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Power automate flow - ODATA filter

    Please check you have correctly entered the field name as they are case sensitive also put the filter query like below

    (agedAsOfDate eq @{variables('currentDate')}) and (balanceDue gt 0) 

  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 74,115 Super User 2024 Season 2 on at
    RE: Power automate flow - ODATA filter

    First of all, you are not using OData, but a standard API.

    Your syntax is fine, but the fields in the API are case-sensitive.

    For example,

    pastedimage1685407886460v3.png

    pastedimage1685407684631v1.png

    So, change Description to description, Document_No to documentId, Type to lineType and try again. (Note that there is no Document No in this standard API, only documentId.)

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_purchaseinvoiceline_get

    Hope this helps.

    Thanks.

    ZHU

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans