Row Level Filtering
Last updated
Last updated
Each External Object can have a single row level filter applied, which restricts records to a subset that match some User attribute.
This will add an automatic WHERE clause to the database query, of the form
<column name> <operator> <salesforce operand>
This clause is automatically applied, regardless of any other filtering occurring on the object.
Row Level Filtering is configured in the Setup UI, under the "Omnata Connect" tab.
The following operators are supported:
The value of the Salesforce operand must match the value in the database column. The data type of the Salesforce operand should be comparable to the data type in the database.
The value of the Salesforce operand must appear in an Array column. This operator is only supported in Snowflake and Rockset, and can only be used with array columns.
The value of the Salesforce operand will be split into an array on the ';' character, and Multipicklist fields are a good choice as they are automatically delimited on this character. This operator is only supported in Snowflake and Rockset, and can only be used with array columns. The row will be visible if the two arrays share at least one value in common.
AND: Both the Salesforce operand and the database column must be boolean. The following truth table determines whether or not the row will be visible:
Database | Salesforce | Row Visible |
---|---|---|
TRUE | TRUE | Yes |
TRUE | FALSE | No |
FALSE | TRUE | No |
FALSE | FALSE | No |
OR: Both the Salesforce operand and the database column must be boolean. The following truth table determines whether or not the row will be visible:
Database | Salesforce | Row Visible |
---|---|---|
TRUE | TRUE | Yes |
TRUE | FALSE | Yes |
FALSE | TRUE | Yes |
FALSE | FALSE | No |
XOR: Both the Salesforce operand and the database column must be boolean. The following truth table determines whether or not the row will be visible:
Database | Salesforce | Row Visible |
---|---|---|
TRUE | TRUE | No |
TRUE | FALSE | Yes |
FALSE | TRUE | Yes |
FALSE | FALSE | No |
NAND: Both the Salesforce operand and the database column must be boolean. The following truth table determines whether or not the row will be visible:
Database | Salesforce | Row Visible |
---|---|---|
TRUE | TRUE | No |
TRUE | FALSE | Yes |
FALSE | TRUE | Yes |
FALSE | FALSE | Yes |
NOR: Both the Salesforce operand and the database column must be boolean. The following truth table determines whether or not the row will be visible:
Database | Salesforce | Row Visible |
---|---|---|
TRUE | TRUE | No |
TRUE | FALSE | No |
FALSE | TRUE | No |
FALSE | FALSE | Yes |
The left hand side is always just the value in the specified database column.
The right hand side is evaluated in Salesforce per query, in the context of the user. It can be:
User attribute: An attribute of the current User
User is member of Public Group (directly): A boolean value indicating whether or not the current user is a member of a Public Group. "Directly" means that the user must be directly assigned to the group, not another group which belongs to this group.
User not member of Public Group (directly): A boolean value indicating the inverse of the above; whether or not the current user is not a member of a Public Group.
User is assigned Permission Set: A boolean value indicating whether or not the current user has been assigned a particular Permission Set.
User not assigned Permission Set: A boolean value indicating indicating the inverse of the above; whether or not the current user has not been assigned a particular Permission Set.