Announcing the Global SNUG Board of Directors. Learn more here
on 06-17-2019 06:56 AM
Hi,
In this article, I am going to explain the use of reference qualifiers.
As you all aware, a reference field in SN basically means a reference to a field in another table. When you make the reference field visible on the form, then it basically fetches all the values of the field from the other table and display them. But if you want to filter the values that you want to show in the reference field, then you can use reference qualifiers.
There are 3 types of Reference Qualifiers.
How to create a Reference Qualifier
Simple Reference Qualifier
Simple reference qualifier is used when you want to filter the rows using AND/OR conditions. For example, if you want to filter all users which are active, then you can use simple reference Qualifier.
To create simple reference qualifier, follow the steps as given above. Then once you select Simple under User Reference Qualifier, then you will see a field Reference Qual Conditions. here you can select the conditions such as Active = true and update.
Then the field will only show all users who are Active = True.
Look at the below screenshot which shows only active callers that belong to company ACME Africa in the incident form.
Dynamic Reference Qualifier
Dynamic reference qualifiers enable you to use a dynamic filter option to run a query against a reference field to filter the returned data set. Dynamic filter options are stored filters that can contain encoded query strings, JavaScript, or script includes and can be used in multiple dynamic reference qualifiers.
The base instance provides several OOB dynamic filter options. If a dynamic filter option that meets your needs does not exist, you can create a new dynamic filter option that is specific to your requirements.
Then configure the Reference Qualifier as below.
Advanced Reference Qualifier
Advanced reference qualifiers enable you to write a script to filter the result set which you cannot do either with simple or dynamic reference qualifiers. Also with Advanced reference qualifier, you can filter the result set based on the other field.
Here is how you can configure advanced Reference Qualifier.
Let us write a simple script include which returns the active callers who belong to ACME Africa Company.
Now Call this Script Include from the reference Qualifier like below.
In Advanced Reference Qualifier, without using the Script include, you can achieve this like below.
If you find this article useful, kindly bookmark it and click on the helpful button.