The search menu in Harmoni makes it simple to find items in the project tree.
As a Project Owner, search lets you easily find and update labels. You can change labels one by one, or search for similar labels and make many changes at once.
As an Explorer or Creator (non-owner), search helps you find variables quickly, especially in larger projects with many sections and hundreds of items.
In this article
1. Search the Project Tree
To commence your search, type what you are looking for in the search project tree field at the top of the project tree. Hitting enter or clicking on the search icon performs the search.
- Enter the search word in the search project tree field
- Press Enter, or click the search icon
- The search items are returned, highlighted in orange in the project tree
If Harmoni cannot find matches, it displays the message: Warning - no matches in dictionary. You can check your search options and try searching again.
Searched items are are highlighted in orange in the Project Tree
2. Search Menu Options
The Harmoni search menu allows you to control how you search in the project tree. Use the following options to refine your search:
a. Open Replace Field (Search and Replace)
As you design your project, you may change labels one at a time, but there are more efficient ways to change multiple labels in one go. Search and replace can be useful for making several label changes in a single transaction.
- In the search project tree field, enter the word or phrase you want to locate
- Hit enter or click on the search icon
- Once you have found what you are looking for, click open replace field
- Enter your new text in the replace field (to remove the text, do not enter text in the replace field)
- Hit enter or click on the replace icon
b. Search Results
When performing a search there are two options to display the search results:
- Show in tree identifies the found items and displays the entire project tree.
- Shrink reduces the project tree and only shows the found items plus any headings required for context.
- Search for the text
- The show in tree option displays the searched text and all the project tree labels
- Selecting shrink shows only the searched text
c. Search In
- Use all to search across the whole project tree. Headings, axes and elements are searched.
- Use selected to search in items you have selected (highlighted) in the project.
- Search results can be filtered to include specific variable types. Keep all variables types ticked to search across headings, axes and elements or untick as required.
- The display label or the source label can be searched for.
- Select source label
- In this example we have also added the expression search
- In the search project tree field, enter the source label you want to locate
- Hit enter or click on the search icon
- The search will return items that match the relevant source label
d. Search By
- Partial - find any text containing the search string
- Exact - match the entire search string
- Expression - include key characters to tailor a search
Use the following characters in an expression search:
| Character | Description | Example |
| * | Multi-character wildcard |
Q12_* Who finds all labels that contain Q12_, followed by any characters, and the word Who.
|
| ? | Single-character wildcard | Q12_? Who finds all labels that contain Q12_, followed by a single character, and the word Who. |
| \ | Escape character |
\? finds a literal ? instead of using ? as the “single character” operator. |
| ^ | Matches the start of a string |
^Q5 finds any item starting with Q5. |
| $ | Matches the end of a string |
/?$ finds any item ending with a question mark (?). |
Example expression search
- Select search by expression
- In the search project tree area, enter the expression you want to locate. In the example above we have used the single-character wildcard ? and the multi-character wildcard *
- Hit enter or click on the search icon
- The search will return items that match the selected criteria
e. Reset Options
Click on reset options and all search options return to the default settings.
f. Reset Tree
When using search, Harmoni opens the sections and axes to display the searched items. To return the project tree to the default setting, click reset tree at the bottom of the search pane.
Reset tree also clears the search results. Alternatively, you can clear the search by using the X at the end of the search field.
g. Revert label
Revert is a powerful way to return your data design item(s) to a previous/original state. Project Owners can use the revert label option to change the display label across all sources or just from one of your sources. Reverting a label will create a new item(s) in the project tree.
Revert label is not an option for the below scenarios:
- any user created constructions
- when an item only exists in one source
- when the item display label is the same as the source label
Before reverting a label keep in mind that constructions, saved analysis (views/stories) and data in dashboards will be lost. Action is not reversible.
To revert a label:
- Select the label you wish to revert
- In the search menu, select revert label
- Through the wizard you can select the label to revert for each source
- Once you confirm you want to proceed a new item will appear in the project tree
Revert Label - Naming Convention
After revert label, the new item name will follow the below naming convention:
a) Revert all sources
{Item_Source_Label}_{Source_Display_Name}_{Timestamp} _#Reverted#
Example:
- Q3 Q3-Age group_Hotel Survey 2013.sav_20190626091719505_#Reverted#
- Q2b Age Groupings_Hotel Survey 2014.sav_20190626091719505_#Reverted#
b) Revert partial sources
{Item_Source_Label}_{Timestamp}_#Reverted#
Example:
- Q3 Q3-Age group_20190620155411337_#Reverted#
- Weight Weight_20190620155905918_#Reverted#
Where to from here?
Learn more about Harmoni