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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filtering a Dataverse ...
Power Automate
Unanswered

Filtering a Dataverse Lookup Column

(2) ShareShare
ReportReport
Posted on by 432 Moderator

Hi all,

I'm trying to lookup a rowset in the 'Opportunity Product' table. I know the Opportunity and have retrieved it earlier in the flow.

 

For those that are not familiar with Dynamics Sales Professional, the table has a field labelled Opportunity with a column name of opportunityid. That column is a Lookup of the Opportunity table. I assumed (foolishly, it seems) that this would work:

nickellis74_0-1616352868459.png

opportunityid eq @{outputs('Get_the_Quote')?['body/_opportunityid_value']} and productname eq '@{triggerOutputs()?['body/productname']}'

 

I've tried various forms, everything I can think of... So with the quotes:

opportunityid eq 'c3a8892d-etc' and productname eq 'Installation Services'

returns

'A binary operator with incompatible types was detected. Found operand types 'Microsoft.Dynamics.CRM.opportunity' and 'Edm.String' for operator kind 'Equal'.'

 

while without the quotes:
opportunityid eq c3a8892d-etc and productname eq 'Installation Services'

returns

A binary operator with incompatible types was detected. Found operand types 'Microsoft.Dynamics.CRM.opportunity' and 'Edm.Guid' for operator kind 'Equal'.

 

opportunityid eq opportunities(c3a8892d-9c6e-eb11-b1ab-000d3a86b23d) and productname eq 'Installation Services'

returns

An unknown function with name 'opportunities' was found. This may also be a function import or a key lookup on a navigation property, which is not allowed.

 

while

opportunityid eq https://clientdomain.dynamics.com/api/data/v9.1/opportunities(c3a8892d-etc) and productname eq 'Installation Services'

returns

Syntax error at position 23 in 'opportunityid eq https://clientdomain.dynamics.com/api/data/v9.1/opportunities(c3a8892d-etc) and productname eq 'Installation Services''.

 

I feel like I've tried everything, but I don't believe it's just impossible to filter on that column so obviously I haven't!

 

Any ideas?

 

Thanks


Nick

Categories:
I have the same question (0)
  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @nickellis74 

     

    Are you missing the '' on the _opportunityid_value? You have it for the product name.  

    DamoBird365_0-1616356201062.png

     

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here

  • Verified answer
    nickellis74 Profile Picture
    432 Moderator on at

    Thanks Damien,

    As mentioned lower down the post, I tried with and without quotes.

    Elsewhere, someone suggested just pulling the whole list, unfiltered, to see what gets returned, which I did and can now tell you that the answer to this problem is:

    _opportunityid_value eq c3a8892d-etc

    No quote marks. Which I think it's safe to say no amount of reading the documentation was ever going to get me to! Thanks to Pieter at www.sharepains.com for that!

  • Red_Nug Profile Picture
    4 on at

     

    Thank you so much for that. I've spend half a day looking for this solution !

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard