Working With Smart Codes
Creating an ORed Smart Code in the Code Manager
If you only need a simple OR combination of two or more codes as smart code, the easiest way is to use the Code Manager.
Open the Code Manager, select two or more codes, right-click and select the Create Smart Code option from the context menu or the ribbon.
If you wonder why an OR combination is useful rather than just merging the codes, at times you want to keep the codes as regular codes in the code list. If you merge codes, only the merged codes remains. For example, if you code the speakers in a focus group transcript, you can create smart codes for all male and female speakers without losing the code for each individual speaker. If you add these attributes to each speaker unit, the margin becomes very cluttered. Smart codes are not displayed in the margin.
Creating a Smart Code in the Quotation Manager
You can also create smart codes in the Quotation Manager. There you can combine codes using the Boolean operators AND and OR. See Available Operators for Querying Data > Boolean Operators.
Use AND to:
- narrow your results
- tell the database that ALL search terms must apply. This means that the smart code only retrieves quotations that are linked to all codes in the query. In other words, the quotation is coded with multiple codes.
Use OR to:
- connect two or more similar concepts
- broaden your results, telling the database that ANY of the search terms apply. This means the smart code retrieves all quotations of all codes in the query. It is additive.
Open the Quotation Manager and select two or more codes in the filter area on the left.
The default operator in the yellow filter bar above the quotation list is 'ANY'. If you want to change, click on it and select the 'ALL' operator.
To save the results as smart code, click on the Smart Code button in the ribbon; or right-click on any of the selected codes in the side panel and select the option Create Smart Code from the context menu.
Enter a name or use the default name and click Create.
Creating a Smart Code in the Query Tool
Open the Query Tool and build a query.
To save the query, click the Save Smart Code button in the ribbon, enter a name and click Create.
Editing a Smart Code
If you want to see the query that is underlying a smart code, of if you want to modify the query, you can edit the smart code.
Open the Code Manager, select the smart code and in the ribbon click on the button Edit Smart Code.
This opens the query tool where you can review and modify the smart code. See How to build a query.
You cannot delete a code, if it is part of a smart code query. If you want to remove a code that is part of a smart code query, you first must delete the smart code. If you do not want to lose the results stored by the smart code, you can turn it into a snapshot code before deleting it.