Learner Groups- Using AND/OR operators to combine multiple queries

Follow

When creating learner groups, you can use AND or OR operators to fine-tune the categories of learners that are included in the group. This is a short tutorial demonstrating how you can use the different operators to select specific groups of learners. Note that the Learner Group tool relies heavily on Custom Learner Data fields, so be sure that you have set up your custom fields and populated your learner's profiles with the correct values.

 

Using the AND operator to filter your learner group

To create a learner group where members have to meet ALL of the criteria that you select in your queries, use the AND operator between queries..

In the example below, an administrator wants to create a simple learner group containing all of the Supervisor level employees in California. The administrator would need to select the learners who a have both a Supervisor Status of Supervisor AND a Location of CA, by setting up the following queries:

  • Click the Add Subquery button, and create a query that expresses Supervisor Status –IS- Supervisor
  • Click the Add Subquery button, and create a second query expressing Location –IS- CA
  • In between the two queries, set the Operator to AND.

2014-05-22_11-29-14.png

 

Note that out of the 8 learners in Query 1 and the 11 learners in Query 2, the 6 learners who had both Supervisor status and were located in CA were selected. If you imagine the queries as circles in a Venn diagram, the learner group would select the overlapped section between the California circle and the Supervisor circle.

Using the OR operator to filter your learner group

You can use the OR operator to create a learner group where learners who meet one of the criteria you listed, but not all of the criteria.

In the example below, if an administrator wanted to create a learner group for a software Engineering team, one way to accomplish this could  be to use a “job title” field to list the different job titles in the team. Supposing that the 3 job titles in the engineering team are Analyst, Engineer, and QA Tester, they would set up the following 3 queries:

  • Job Title –IS- Analyst
  • Job Title –IS- Engineer
  • Job Title –IS- QA Tester
  • Set both operators in between the queries to OR.

2014-05-22_11-57-05.png

 

You can see that because OR is used, the learner group combines the 3 learners selected for each of the 3 queries, resulting in a total of 9 learners in the group. These 3 queries, linked by OR will select any learner who has a job title of Analyst, Engineer or QA tester.

Combining queries and using multiple AND/OR operators in one learner group

You can combine two or more sub-queries into one query, and perform AND/OR operations on these combined queries. This is especially useful if you have a subset of learners who need to be included in a learner group, but do not have learner data values that relate them to the rest of the group.

In the example below, an administrator wants to create a learner group for all of the Analysts, Engineers and QA testers in the Western US, and also include Engineers located in New York in this group. They could set up one query to include the employees located in the Western US, and another query to include the engineers in New York. Relating these two queries with OR would include all of the learners selected by each query. To do this, the administrator would:

  • Create a query expressing Region -IS- Western US
  • Create a query expressing Job Title -IS- Analyst, Engineer, QA tester. (When multiple values are selected in one query, OR values are used.)
  • In the Job Title query, check the appropriate Make Subquery Of box to combine the two queries into one unit. You can select if you want the subqueries to be related by AND or OR.

2014-05-22_13-01-53.png

  • Repeat the steps above with 2 queries, one expressing Location -IS- NY and Job Title -IS- Engineer
  • You now have 2 separate queries that you can relate with AND or OR
  • To include the New York engineers, set the operator to OR.

2014-05-22_14-14-27.png

 

 

 

Comments