Skip to main content

Notifications

Service | Customer Service, Contact Center, Fie...
Suggested answer

Using contain-values operator for multi-select option set in outer-joined FetchXML makes it behave like an inner join.

Posted on by 100

I have tried to simplify the setup as much as possible.

I have two custom entities, tst_myFirstentity and tst_mySecondentity, with a 1-N relationship between them.
tst_mySecondentity contains a multi-select option set, called tst_multiselectoptionset, with the possible values of 865950000, 865950001 and 865950002.

There is one record in tst_myFirstentity which matches one record in tst_mySecondentity.
The one record in tst_mySecondentity has it’s tst_multiselectoptionset set to 865950000.

 

Using the eq-operator with link-type set to outer works as expected.
It returns every record in the first entity, no matter if the second entity matches or not.
If the second entity matches, then it is included in the result (not the case here):

pastedimage1648544546404v3.png


Using the contain-values operator with link-type set to outer does not seem to work as expected.
It only returns records from the first entity if the second entity matches (not the case here):
pastedimage1648544602629v4.png

Is this a known issue? And is there a workaround?

Thanks,
DFKA

  • DFA Profile Picture
    DFA 100 on at
    RE: Using contain-values operator for multi-select option set in outer-joined FetchXML makes it behave like an inner join.

    Thanks for your help,

    I have re-posted my question on the Power Apps community.

  • Suggested answer
    DavePinch Profile Picture
    DavePinch on at
    RE: Using contain-values operator for multi-select option set in outer-joined FetchXML makes it behave like an inner join.

    Hi DFA, this forum may not get a lot of visibility with FetchXML developers (although you can use FetchXML to pull Dynamics 365 Guides data from Dataverse). I would post your question on the Power Apps community:

    I did some searches for FetchXML to see if people are talking about it. The Microsoft Dataverse forum is a good start:

    Good luck DFA! You will need to re-post yourself as I cannot move your posting to another community.  For reference, here is FetchXML documentation:

  • DFA Profile Picture
    DFA 100 on at
    RE: Using contain-values operator for multi-select option set in outer-joined FetchXML makes it behave like an inner join.

    I could generate all possible combinations and apply them using the in-operator on a or-filter.
    For the above example, 865950001 would become something like:

    pastedimage1648553970607v1.png


    But it seems that the whole purpose of the contain-values operator is to avoid this mess.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans