Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Power Automate List records filter

  • 1.  Power Automate List records filter

    Posted Jul 03, 2020 06:51 PM
    I am having trouble with the List Records Filter Query.

    When I enter: 

    Or adding the single quotes:

    This is the error:


    The WO Number is the GUID.  I change to the text value output in Work Order Number as below:

    This is the error:


    I try it with the single quotes:



    and I am back to the original error:

    The field in question is named msdyn_workorder and the value in it is WO-000341344


    How should the Filter Query be set to find this record?

    Thank you in advance,



    ------------------------------
    Paul Richards
    BlueCrest Inc
    Danbury
    ------------------------------
    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 2.  RE: Power Automate List records filter

    MICROSOFT MVP
    Posted 29 days ago
    Hi Paul - a good help would be to use FetchXML Builder for XrmToolBox to construct the query, and then have it compose the List Records parameters for you.
    See a sample of this feature: https://fetchxmlbuilder.com/features/#render-flow

    Jonas

    ------------------------------
    Jonas Rapp
    MVP
    Sweden
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 3.  RE: Power Automate List records filter

    Posted 28 days ago
    I 2nd using the FetchXMLBuilder from XrmToolBox, in this scenario I'd hazard a guess that the msdyn_workorder field is a lookup, in the fetchxml it'll probably require a link entity to the entity in question, or you could use the odata filter attributes of the Power Automate List Records component which should then allow _msdyn_workorder_value eq 'xxxxx' (or something similar, been a while since I used the odata method)

    Good luck


    ------------------------------
    Michael Wink
    Willis Towers Watson
    Reigate
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 4.  RE: Power Automate List records filter

    SILVER CONTRIBUTOR
    Posted 28 days ago
    Hi Paul,

    I agree with both of the above responses; FetchXML certainly works but is a bit clunky for such a basic filter. The filters do all work off of odata values, so it's always helpful to run a test flow and review the output values to see how fields are referenced when in doubt.

    However, if you're listing records for a specific GUID, then I'd recommend using the 'Get a record' action. This asks for the entity and GUID as the input, and then the results are not in an array, either, so dynamic content afterwards is much simpler.

    ------------------------------
    Chad Althaus
    Bray International, Inc.
    Houston TX
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 5.  RE: Power Automate List records filter

    MICROSOFT MVP
    Posted 28 days ago
    Just to clarify: I wasn't suggesting to use a FetchXML query for this scenario - but to use the tool FetchXML Builder to get the exact filter parameters for the List Records action :)

    ------------------------------
    Jonas Rapp
    MVP
    Sweden
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 6.  RE: Power Automate List records filter

    Posted 28 days ago
    Shows how many ways there are to achieve the same result with D365, love it.

    ------------------------------
    Michael Wink
    Willis Towers Watson
    Reigate
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 7.  RE: Power Automate List records filter

    Posted 27 days ago
    Yes, that is what the issue was.  It is a lookup.  I did try adding _value on it and received the same issue.

    In the end, this got the job done:


    I do appreciate everyone's comments on this!! 


    ------------------------------
    Paul Richards
    BlueCrest Inc
    Danbury
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 8.  RE: Power Automate List records filter

    Posted 26 days ago
    I 2nd using the MyCareerBuilder from Toolbox, in this scenario I'd hazard a guess that the dynamo_work order field is a lookup, in the fetcher it'll probably require a link entity to the entity in question, or you could use the data.

    ------------------------------
    junaid khan
    it
    lahore
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


If you've found this thread useful, dive deeper into User Group community content by role