---
# System prepended metadata

title: Tag Query Builder

---

# Tag Query Builder

# Building a tag query

- Should open the modal clicking on the "+ Select" on the schedule bar
- The upper select must have an "any" option a "none" option and a "all contacts"
- Selecting all contacts hides the search for tags input
- Clicking on "Add" must add a new "Tags #" below
- The "Search for tags" select must work with up and down arrow and enter
- In "Search for tags" select, up and down arrow must follow the scroll(in openDropView)
- In "Search for tags" select, up and down arrow must reset to the first option after close the openDropView
- Must have a message for when there are no matches
- The tags should be separated by it's categories, in alphabetical order
- After selecting a tag, it should show it underneath the select
- The tags list underneath should have unique tags only
- After applied should change the "+ Select" to "Edit"
- After applied should show the amount of contacts selected by the query between the "Recipients" and the "Edit" 
- After applied and selecting more than 3 tags should show 2 tags and a "+N more" tag
- The X above each query component should delete it from the list
- The last component cannot be deleted
- Deleting a component on the middle of the list must keep the list order and the numbers with no gaps
- Saving a search should update the list on the schedule bar without refreshing the page
- Saving a search should close the modal
- Saving a search should select it for current use
- Cancel button must only close the modal
- Clear button must clear all tags selected