{"id":6495,"date":"2021-11-13T13:52:55","date_gmt":"2021-11-13T12:52:55","guid":{"rendered":"https:\/\/usemaps.com\/kb\/uncategorized\/managing-dictionaries-in-usemaps\/"},"modified":"2021-11-13T13:52:55","modified_gmt":"2021-11-13T12:52:55","slug":"managing-dictionaries-in-usemaps","status":"publish","type":"knowledgebase","link":"https:\/\/usemaps.com\/en\/usemaps-documentation\/data-management\/managing-dictionaries-in-usemaps\/","title":{"rendered":"Managing Dictionaries in Usemaps"},"content":{"rendered":"<p>The purpose of using dictionaries is to maintain data consistency by limiting the ability to enter arbitrary data. With dictionaries, when editing or adding an object, you can only select values from a predefined list. <\/p>\n<h4>Basic Information<\/h4>\n<ol>\n<li>Dictionaries are lists of values for a given <a href=\"https:\/\/usemaps.com\/kb\/definicje\/typ-danych\/\">Type,<\/a> which can be added as an <a href=\"https:\/\/usemaps.com\/kb\/definicje\/atrybuty-systemowe\/\">Attribute<\/a> value.<\/li>\n<li>Dictionaries are managed by the System Administrator.<\/li>\n<li>Optionally, a color can be assigned to each value in the Dictionary.<\/li>\n<li>A Dictionary assigned to an Attribute appears in multiple places, for example, during filtering.<\/li>\n<li>It is important to carefully plan the dictionary policy before starting to edit data. Later changes will require mass updates of attribute values. <\/li>\n<li>Dictionaries are independent of the data. They are created in Administration &gt; Dictionaries. The same dictionary can be \u201cassigned\u201d to multiple attributes across multiple Sources.  <\/li>\n<li>Dictionaries are assigned to Data Sources, not to Layers (see the differences between a Source and a Layer). All Layers created from the same Source inherit the assigned Dictionaries. This helps maintain data consistency.  <\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/usemaps.com\/wp-content\/uploads\/2021\/11\/Screenshot-15-1024x556.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-6420 size-large\" src=\"https:\/\/usemaps.com\/wp-content\/uploads\/2021\/11\/Screenshot-15-1024x556.png\" alt=\"\" width=\"800\" height=\"434\" srcset=\"https:\/\/usemaps.com\/wp-content\/uploads\/2021\/11\/Screenshot-15-1024x556.png 1024w, https:\/\/usemaps.com\/wp-content\/uploads\/2021\/11\/Screenshot-15-300x163.png 300w, https:\/\/usemaps.com\/wp-content\/uploads\/2021\/11\/Screenshot-15-768x417.png 768w, https:\/\/usemaps.com\/wp-content\/uploads\/2021\/11\/Screenshot-15-1536x835.png 1536w, https:\/\/usemaps.com\/wp-content\/uploads\/2021\/11\/Screenshot-15.png 1673w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h4>Types of Dictionaries<\/h4>\n<p>The System distinguishes between:<\/p>\n<ol>\n<li>Simple Dictionary \u2013 a closed list of values created and managed by the Administrator. This is the most commonly used option. <\/li>\n<li>Dynamic Dictionary \u2013 created based on a Data Source. This option is used for special purposes. <\/li>\n<\/ol>\n<h4>Use Cases<\/h4>\n<h3><strong>1. How to create a dictionary in Usemaps?<\/strong><\/h3>\n<p>To add a new dictionary, you should:<\/p>\n<ol>\n<li>Go to: Data. Click on Dictionaries <\/li>\n<li>Click the blue plus icon, then \u201cAdd Dictionary.\u201d A new window will open:\n<ol>\n<li>Dictionary Name: enter the name of the dictionary.<\/li>\n<li>Data Type: specify the <a href=\"https:\/\/usemaps.com\/kb\/definicje\/typ-danych\/\">Data Type<\/a> (the dictionary\u2019s data type must match the Attribute\u2019s data type. You cannot use values like \u201cYES\u201d and \u201cNO\u201d in a dictionary assigned to a field meant for numbers).<\/li>\n<li>Fill in the dictionary values. Add as many as needed. <\/li>\n<\/ol>\n<\/li>\n<li>[Optional] A color can be assigned to dictionary values. <\/li>\n<li>[Optional] An image can be added to dictionary values. <\/li>\n<li>Click Save.<\/li>\n<\/ol>\n<h3><strong>2. How to edit a dictionary and manage its values?<\/strong><\/h3>\n<p>To edit an existing dictionary:<\/p>\n<ol>\n<li>Click the three-dot menu next to the dictionary name.<\/li>\n<li>In the opened window, add, delete, or modify dictionary values.<\/li>\n<li>Click \u201cSave\u201d<\/li>\n<\/ol>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-5378 size-full\" src=\"https:\/\/usemaps.com\/wp-content\/uploads\/2026\/01\/slowniki_zarzadzanie.gif\" alt=\"\" width=\"800\" height=\"399\"><\/p>\n<p><strong>Note!<\/strong><\/p>\n<p>If a dictionary is linked to an attribute and a value is already used in the attributes, it cannot be deleted or edited. You must first remove that value from the objects\u2019 attributes. <\/p>\n<h3><strong>3. How to \u201cassign\u201d a Dictionary to an Attribute?<\/strong><\/h3>\n<ol>\n<li>In the Data panel, click on the name of the Data Source. The Data Source Manager will open. <\/li>\n<\/ol>\n<div style=\"max-width: 800px; margin: 0 auto;\">\n<div style=\"width: 800px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-6495-1\" width=\"800\" height=\"441\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/webm\" src=\"https:\/\/usemaps.com\/wp-content\/uploads\/2021\/11\/Usemaps-Screencastify-January-29-2026-10_34-AM.webm?_=1\" \/><a href=\"https:\/\/usemaps.com\/wp-content\/uploads\/2021\/11\/Usemaps-Screencastify-January-29-2026-10_34-AM.webm\">https:\/\/usemaps.com\/wp-content\/uploads\/2021\/11\/Usemaps-Screencastify-January-29-2026-10_34-AM.webm<\/a><\/video><\/div>\n<\/div>\n<h3>4. How to create a dictionary based on existing attribute field values?<\/h3>\n<p>Sometimes we want to generate a dictionary based on an existing attribute that already contains values. For example, in a created layer, there may be a \u2018Status\u2019 field where users entered values such as: \u201cTo Do,\u201d \u201cCompleted,\u201d \u201cCancelled,\u201d \u201cIn Progress.\u201d During work, it may become necessary to convert this attribute into a dictionary so that the same value does not have to be entered manually each time, but can be selected from a dropdown list. To do this, in the Administrator panel, you need to import a dictionary from the existing Data Source.   <\/p>\n<p><strong>Procedure:<\/strong><\/p>\n<ol>\n<li>Go to: Data &gt; Dictionaries<\/li>\n<li>Click the blue plus icon, then select the \u201cFrom Data Source\u201d option from the list.<\/li>\n<li>A new window will open, where you should: assign a dictionary name, select the data source of the layer, and indicate the attribute name in which the values were entered.<\/li>\n<li>A newly generated dictionary will appear in the list of dictionaries. To open it, click on it. <\/li>\n<li>Finally, assign the dictionary to the appropriate layer attribute. To do this, go to Data Sources and then to Attribute Management. <\/li>\n<\/ol>\n<div style=\"max-width: 800px; margin: 0 auto;\">\n<div style=\"width: 800px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-6495-2\" width=\"800\" height=\"450\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/usemaps.com\/wp-content\/uploads\/2026\/01\/slownik.mp4?_=2\" \/><a href=\"https:\/\/usemaps.com\/wp-content\/uploads\/2026\/01\/slownik.mp4\">https:\/\/usemaps.com\/wp-content\/uploads\/2026\/01\/slownik.mp4<\/a><\/video><\/div>\n<\/div>\n<h4>Notes<\/h4>\n<p>When editing a dictionary, you cannot delete a value that is currently used in the data, as this would cause inconsistencies. If you want to remove a value from a Dictionary, you must first replace it everywhere it is used.<br \/>For example, if you have a dictionary with the values \u201cYes,\u201d \u201cNo,\u201d and \u201cI don\u2019t know,\u201d and the value \u201cI don\u2019t know\u201d is used in the data, you will not be able to delete it. First, go to the layer and change all occurrences of \u201cI don\u2019t know\u201d to another desired value (for example, using Mass Attribute Update), and only then delete the \u201cI don\u2019t know\u201d value from the dictionary.   <\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The purpose of using dictionaries is to maintain data consistency by limiting the ability to enter arbitrary data. With dictionaries, when editing or adding an object, you can only select values from a predefined list. Basic Information Dictionaries are lists of values for a given Type, which can be added as an Attribute value. Dictionaries [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","knowledgebase_cat":[85],"knowledgebase_tag":[],"class_list":["post-6495","knowledgebase","type-knowledgebase","status-publish","hentry","knowledgebase_cat-data-management"],"_links":{"self":[{"href":"https:\/\/usemaps.com\/en\/wp-json\/wp\/v2\/knowledgebase\/6495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/usemaps.com\/en\/wp-json\/wp\/v2\/knowledgebase"}],"about":[{"href":"https:\/\/usemaps.com\/en\/wp-json\/wp\/v2\/types\/knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/usemaps.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/usemaps.com\/en\/wp-json\/wp\/v2\/comments?post=6495"}],"version-history":[{"count":0,"href":"https:\/\/usemaps.com\/en\/wp-json\/wp\/v2\/knowledgebase\/6495\/revisions"}],"wp:attachment":[{"href":"https:\/\/usemaps.com\/en\/wp-json\/wp\/v2\/media?parent=6495"}],"wp:term":[{"taxonomy":"knowledgebase_cat","embeddable":true,"href":"https:\/\/usemaps.com\/en\/wp-json\/wp\/v2\/knowledgebase_cat?post=6495"},{"taxonomy":"knowledgebase_tag","embeddable":true,"href":"https:\/\/usemaps.com\/en\/wp-json\/wp\/v2\/knowledgebase_tag?post=6495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}