Created
January 2, 2025 23:03
-
-
Save melamriD365/eb9dd8d254bf92ee7cf0ae958416665e to your computer and use it in GitHub Desktop.
OR Conditions Between Different Relationships in Dataverse
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<fetch distinct="true"> | |
<entity name="meaf_project"> | |
<!-- Attributes to retrieve --> | |
<attribute name="meaf_projectid" /> | |
<attribute name="meaf_name" /> | |
<attribute name="meaf_description" /> | |
<!-- Link-entities for User Roles: Project Manager, Contributor, Reviewer --> | |
<link-entity name="systemuser" from="systemuserid" to="meaf_managerid" alias="manager" link-type="outer" /> | |
<link-entity name="systemuser" from="systemuserid" to="meaf_contributorid" alias="contributor" link-type="outer" /> | |
<link-entity name="systemuser" from="systemuserid" to="meaf_reviewerid" alias="reviewer" link-type="outer" /> | |
<!-- Link-entity for "Secondary Contributors" N:N Relationship --> | |
<link-entity name="meaf_project_secondarycontributors" from="meaf_projectid" to="systemuserid" alias="sec_contributor_relation" link-type="outer" intersect="true"> | |
<link-entity name="systemuser" from="systemuserid" to="systemuserid" alias="sec_contributor_user" link-type="outer" /> | |
</link-entity> | |
<!-- Link-entity for "Secondary Reviewers" N:N Relationship --> | |
<link-entity name="meaf_project_secondaryreviewers" from="meaf_projectid" to="systemuserid" alias="sec_reviewer_relation" link-type="outer" intersect="true"> | |
<link-entity name="systemuser" from="systemuserid" to="systemuserid" alias="sec_reviewer_user" link-type="outer" /> | |
</link-entity> | |
<!-- Top-level Filter with OR Conditions --> | |
<filter type="or"> | |
<!-- Conditions for User Roles --> | |
<condition entityname="manager" attribute="systemuserid" operator="eq-userid" /> | |
<condition entityname="contributor" attribute="systemuserid" operator="eq-userid" /> | |
<condition entityname="reviewer" attribute="systemuserid" operator="eq-userid" /> | |
<!-- Conditions for N:N Relationships --> | |
<condition entityname="sec_contributor_user" attribute="systemuserid" operator="eq-userid" /> | |
<condition entityname="sec_reviewer_user" attribute="systemuserid" operator="eq-userid" /> | |
</filter> | |
</entity> | |
</fetch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment