External Filtering

How do I use the external query to allow filtering additions?

First, create an input that is a JSON data type.

In this example, the input named "external" was added and is a JSON data type.

Next, link the configuration in the External query tab to the JSON input using the drop down menu. Additionally, select "Allow Filtering Additions" permission.

In this example, under the External tab of the Query all Records function, we linked up the input "external" for external filtering. Additionally, we selected the permission to Allow Filter Additions.

Now, we are ready to use the filter by external query. Because the external query takes a JSON input, we must format the input in a JSON like the examples below.

GET users with the email [email protected]:

{
"external": {
"expression": [{
"statement": {
"left": {
"tag": "col",
"operand": "user.email"
},
"right": {
"operand": "[email protected]"
}
}
}]
}
}
In this example, the code block above is pasted into the Run & Debug. This will filter by users with the email address "[email protected]"

GET users with a score great than 10:

{
"external": {
"expression": [{
"statement": {
"left": {
"tag": "col",
"operand": "user.score"
},
"op": ">",
"right": {
"operand": 10
}
}
}]
}
}

GET users with the email [email protected] AND a score greater than 10:

{
"external": {
"expression": [{
"statement": {
"left": {
"tag": "col",
"operand": "user.email"
},
"right": {
"operand": "[email protected]"
}
}
}, {
"statement": {
"left": {
"tag": "col",
"operand": "user.score"
},
"op": ">",
"right": {
"operand": 10
}
}
}]
}
}

GET users with the email [email protected] OR a score greater than 10:

{
"external": {
"expression": [{
"statement": {
"left": {
"tag": "col",
"operand": "user.email"
},
"right": {
"operand": "[email protected]"
}
}
}, {
"or": true,
"statement": {
"left": {
"tag": "col",
"operand": "user.score"
},
"op": ">",
"right": {
"operand": 10
}
}
}]
}
}

GET users with the email [email protected] AND a score greater than 10 or less than 5:

{
"external": {
"expression": [{
"statement": {
"left": {
"tag": "col",
"operand": "user.email"
},
"right": {
"operand": "[email protected]"
}
}
}, {
"type": "group",
"group": {
"expression": [{
"statement": {
"left": {
"tag": "col",
"operand": "user.score"
},
"op": ">",
"right": {
"operand": 10
}
}
}, {
"or": true,
"statement": {
"left": {
"tag": "col",
"operand": "user.score"
},
"op": "<",
"right": {
"operand": 5
}
}
}]
}
}]
}
}

​