Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Cloud flow: Filter on lookup field not working .

(0) ShareShare
ReportReport
Posted on by 20

i need to filter related data of lookup filed. I have custom entity Asset checklist . Asset and asset checklist have 1:N relationship. I have lookup of asset on work order. I am trying to fetch asset checklist related to asset in work order (On create ). But filter is not working.

Error : A binary operator with incompatible types was detected. Found operand types 'Edm.Guid' and 'Edm.String' for operator kind 'Equal'.

pastedimage1619445995166v1.png

 created new thread. As i checked i am not using primary incident asset lookup in work order. its labeled Asset .

I have tried removing quotes, ended in syntax error. checked if asset value is null, it wasn't. Please suggest something.

  • Sayali Profile Picture
    Sayali 20 on at
    RE: Cloud flow: Filter on lookup field not working .

    Thanks for the help, actually the issue was not in filter but in trigger, when i changed trigger from ' create' to create or update then flow worked fine. now problem is flow is running multiple times whenever work order is updated, i need to stop that. can you help?

  • Verified answer
    Nya Profile Picture
    Nya 29,058 on at
    RE: Cloud flow: Filter on lookup field not working .

    Hi,

    It is recommended to replace the “Asset(Value)” to a fixed id of the Asset according to your pre-steps. This allows you to troubleshoot which part of your expression has gone wrong. The id can be found in the URL of the asset. (id = xxxxxxxxx)

     

    After finding the id, change your expression into “_cfm_asset_value eq xxxxxxxxx” or “_asset_value eq xxxxxxxxx”. If this form can list the results you want, then the problem is that the dynamic content Asset(Value) is a wrong choice, and if it still does not list, then there is a problem with the first half of the expression.

     

    The image below is still an example of Contact and Account.

     pastedimage1619577463720v1.png

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Nya

  • Sayali Profile Picture
    Sayali 20 on at
    RE: Cloud flow: Filter on lookup field not working .

    HI,

    thank you for your reply. I have checked which value is taken in filter, and both fields are asset lookups so used _asset_value to match with guid.

    still not working. :|

  • Suggested answer
    Nya Profile Picture
    Nya 29,058 on at
    RE: Cloud flow: Filter on lookup field not working .

    Hi,

    I have tried to reproduce your issue so I created a similar Flow based on Contact and Account entity. There is also an N: 1 relationship between them.

    For example, I listed all the contacts whose company name (which can be an account) has been updated.

    Here are the steps:

     pastedimage1619516476892v1.png

    Using the steps in my screenshot, all contacts can be listed with or without quotes.

    So the problem should be with your choice of dynamic content.

     

    According to your request, the Asset here must be the id of an Asset but when I set the table to Customer Asset or Work Order in Step1, I don't find a value like the one in your screenshot in the Dynamic content list in Step2.

     pastedimage1619516489051v2.pngpastedimage1619516496290v3.png

    So you need to check which entity you are using to get the Asset(Value) from, whether it is from the custom entity and what is the data type of it.

     

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Nya

  • Sayali Profile Picture
    Sayali 20 on at
    RE: Cloud flow: Filter on lookup field not working .

    pastedimage1619506053938v1.png

    is it better now?

  • Nya Profile Picture
    Nya 29,058 on at
    RE: Cloud flow: Filter on lookup field not working .

    Hi,

    As the image you provided is a bit blurry, would you please to change it to a sharper one.

    You can either take a screenshot and paste it or upload a saved image.

     

    Looking forward to your reply.

    Best Regards,

    Nya

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans