Skip to main content

Link negated option

The result of conditional nodes in a query can be inverted using the Link Negated property.

For example, if you were performing a query to find all the team members linked to a specific team, using the Link Negated property would allow you to find all the members not linked to a specific team.

Requirements

  1. The Link Negated property can only be applied to conditional node as it inverts the specified condition.

  2. The Link Negated property only applies to conditional nodes where a path is specified in the condition node.

Example

As an example use case, the following query uses Link Negated to query all users that are not part of team 5f2be40ca2362a006a837e0a using the path from Users to Team Members to Teams:

{
"aqs": {
"type": "Query",
"properties": {
"dodiCode": "designs_users",
"collectionCode": "Live",
"attributes": ["attributes_itemsTitle", "attributes_itemsSubtitle"]
},
"children": [
{
"type": "Equals",
"children": [
{
"type": "ItemProperty",
"properties": {
"itemPropertyName": "itemId",
"path": "root.attributes_usersTeamMembers^attributes_teamsMembers"
}
},
{
"type": "AlloyId",
"properties": {
"value": ["5f2be40ca2362a006a837e0a"]
}
}
],
"properties": {
"linkNegated": true
}
}
]
}
}