I've read several pages of search results on this but haven't quite found the answer.
- I have a team that will contain all US Citizens called "The ITAR Team".
- I have a View where I have queried the User table for my custom field holding the citizenship (export clearance)
- Initially when I set the system up, I bulk-added all the people on that view to the team. That worked out great.
- However now, let us say I want to add any newly added US Citizens to a team, I cannot so easily do so. What I have found is that if you select all from a view, and the system runs into a team member already on the team, it will stop adding.
So now I have a need to build a View of Users where user.citizenship = "US" and user is _not_ member of US Team. I have tried doing this with the "Teams" related entity... Teams.Team Does Not Equal "US Team". However, that doesn't seem to work - I can clearly see members of the team listed on the results. I have tried a few other variations too. It seems like if the user is a member of at least one team other than the mentioned team, it returns true. Is there a better way to do this?
Here is my FetchXml for the failing query, in case it makes sense to you.
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
<entity name="systemuser">
<attribute name="fullname" />
<order attribute="fullname" descending="false" />
<filter type="and">
<condition attribute="new_exportclearance" operator="eq" value="100000001" />
</filter>
<link-entity name="teammembership" from="systemuserid" to="systemuserid" visible="false" intersect="true">
<link-entity name="team" from="teamid" to="teamid" alias="ai">
<filter type="and">
<condition attribute="teamid" operator="ne" uiname="ITAR Team" uitype="team" value="{CF0A1BE6-2279-E611-8100-0050569F5CD5}" />
</filter>
</link-entity>
</link-entity>
</entity>
</fetch>
*This post is locked for comments