{"id":1489,"date":"2010-02-15T03:45:50","date_gmt":"2010-02-15T09:45:50","guid":{"rendered":"http:\/\/www.mrc-productivity.com\/legacy\/?page_id=1489"},"modified":"2023-11-21T09:42:21","modified_gmt":"2023-11-21T15:42:21","slug":"create-dropdowns-in-m-painter","status":"publish","type":"page","link":"https:\/\/www.mrc-productivity.com\/legacy\/m-painter-app-prop\/create-dropdowns-in-m-painter","title":{"rendered":"Create Dropdowns in m-Painter"},"content":{"rendered":"<p><!-- Begin Content --><\/p>\n<h1>Create Dropdowns in m-Painter<\/h1>\n<p>Click <a href=\"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/create-dropdowns-in-m-painter\">here<\/a> to view current documentation for this feature.<\/p>\n<p>Jump to:<br \/>\n<a href=\"#a1\">Creating Drop-Down Lists from the Current Application<\/a><br \/>\n<a href=\"#a2\">Creating Drop-Down Lists from an External Table<\/a><br \/>\n<a href=\"#a3\">Creating Combobox Drop-Down Lists<\/a><br \/>\n<a href=\"#a4\">Creating Drop-Down Lists in the Interactive Report Template<\/a><br \/>\n<a href=\"#a5\">Release Notes<\/a><\/p>\n<p>This document explains the two ways to implement drop-down lists: From the current application (applies to Retrievals &amp; Reports templates) and from an external table (applies to Retrievals, Reports, and Maintenance templates).<\/p>\n<p>Build your application as you normally would.  Next, open m-Painter.  Find the input box that you would like to convert into a drop-down box.  From the image below, you can see I am working with a Multiple Record Retrieval.<\/p>\n<p><img decoding=\"async\" class=\"border\" src=\"\/legacy\/images\/dropdowns1.JPG\"><\/p>\n<p>Right-click on the input box you want to convert, and select &quot;Insert\/Edit Option List&quot; (Or you can left click on the input, and select the &quot;Insert Option List&quot; button from the m-Painter toolbar).  A dialog will appear.  Below, each option is explained:<\/p>\n<p><img decoding=\"async\" class=\"border\" src=\"\/legacy\/images\/dropdowns2.jpg\"><\/p>\n<p>Type &#8212; This list contains the different inputs you can choose:<\/p>\n<ul>\n<li class=\"padleft\">Drop-Down list &#8212; This option will change your input into a drop-down list.<\/li>\n<li class=\"padleft\">Radio Buttons &#8212; While not as popular as the drop-down list, radio buttons are usually used when the number of options is less than 10.<\/li>\n<li class=\"padleft\">Text Input &#8212; Choosing this option will revert your input back to the standard text input.  This option is the only one that allows your end-user to free type.<\/li>\n<\/ul>\n<p>Blank Option Text &#8212; If there is a value in this input, it will be used as the default value for the drop-down list.  A very common value for this option is &quot;Select a &#8230;&quot; (Replacing &#8230; with the appropriate subject matter).  If you do not specify default text, the end user is forced to select a value from their drop-down list.<\/p>\n<p>Option Data Source &#8212; You have two valid options:<\/p>\n<ul>\n<li class=\"padleft\">Current App &#8212; Your drop-down list is populated by analyzing the current table, and using values found in the table for the particular field.<\/li>\n<li class=\"padleft3\">Option Sort Order (Current App only) &#8212; This option allows you to control whether your list will populate in Ascending or Descending order.<\/li>\n<li class=\"padleft\">External Retrieval &#8212; In this instance, your drop-down list is populated by querying the retrieval you select and returning all values.<\/li>\n<li class=\"padleft3\">Select External Retrieval (External Retrieval only) &#8212; This list will show all applications compiled with the Option List template.<\/li>\n<li class=\"padleft3\">Cascading? (Report only, Current App only) &#8212; This option allows the prompt page of your report to filter drop-down lists based on the selections made within other drop-down lists.<\/li>\n<\/ul>\n<p>Apply to Field &#8212; This option tells m-Painter where to build your drop-down list.  The value in this input box is decided by which input you clicked on when you created the drop-down list and does not need to be modified.<\/p>\n<p>The below screenshot is the result set from our Current App drop-down list.  Notice how in my small dataset, only the states listed in the table are available to select.<\/p>\n<p><img decoding=\"async\" class=\"border\" src=\"\/legacy\/images\/dropdowns3.JPG\"><\/p>\n<h2><a class=\"anchor\" name=\"a1\">Creating Drop-Down Lists from the Current Application<\/a><\/h2>\n<p>In this section we will cover how to create a drop-down from the current application.<\/p>\n<ol>\n<li class=\"padleft\">Right click on the input box you want to convert, and select &quot;Insert\/Edit Option List&quot; (Or you can left click on the input, and select the &quot;Insert Option List&quot; button from the m-Painter toolbar).<\/li>\n<li class=\"padleft\">In the Type Drop-Down List, select &quot;Drop-Down List&quot; or &quot;Radio Buttons&quot;.<\/li>\n<li class=\"padleft\">Enter a &quot;Blank Option Text&quot; (Optional).<\/li>\n<li class=\"padleft\">In the Option Data Source, select &quot;Current App&quot;<\/li>\n<li class=\"padleft\">In the Option Sort Order, select &quot;Ascending&quot; or &quot;Descending&quot;.<\/li>\n<li class=\"padleft\">If working in a Report, you have the option of select the &quot;Cascading&quot; option.  To implement &quot;Cascading&quot; you will need to select this option on more than one drop-down.<\/li>\n<li class=\"padleft\">Unless you have clicked on the wrong input box, you will not need to change the &quot;Apply to Field&quot; text area.<\/li>\n<\/ol>\n<p>Click &quot;OK&quot;.  Save and run your application.<\/p>\n<h2><a class=\"anchor\" name=\"a2\">Creating Drop-Down Lists from an External Table<\/a><\/h2>\n<p>In this section we will cover how to create a drop-down from an external table.<\/p>\n<ol>\n<li class=\"padleft\">The first thing we need to do is build our Inquiry\/Retrieval that will serve as the data source for our external list.  Build a retrieval that consists of either one or two fields.  In the case of a retrieval with one field, it is assumed by m-Power that your drop-down value and description will be the same.  With two fields, you have the option of choosing which field is the value field and which is the description field.<\/li>\n<li class=\"padleft\">Be sure to compile your application using the Option List template.  Compile your application and open Application Properties.<br \/>\n<img decoding=\"async\" class=\"border\" style=\"margin-left:-41px;\" src=\"\/legacy\/images\/dropdowns4.JPG\"><\/li>\n<li class=\"padleft\">The option list_value allows you to specify the value field.  This field will be the field that is sent to the database.  Whereas the list_description option allows you to control what field the end user will see in the database.  For example, in an example where U.S. States are used in a dropdown box, &quot;CA&quot; may be the list_value and &quot;California&quot; would be the list_description.  Specify the necessary fields and press &quot;OK&quot;.<\/li>\n<li class=\"padleft\">Next, open the application that will use this external table and right-click on the input box you want to convert, and select &quot;Insert\/Edit Option List&quot; (Or you can left click on the input, and select the &quot;Insert Option List&quot; button from the m-Painter toolbar).<\/li>\n<li class=\"padleft\">In the Type Drop-Down List, select &quot;Drop-Down List&quot; or &quot;Radio Buttons&quot;.<\/li>\n<li class=\"padleft\">Enter a &quot;Blank Option Text&quot; (Optional).<\/li>\n<li class=\"padleft\">In the Option Data Source, select &quot;External Retrieval&quot;.<\/li>\n<li class=\"padleft\">Select your retrieval from the &quot;Select External Retrieval&quot; drop-down list.  If you are using an existing retrieval that is not a Option List template, you can free type the application address (DataDictionary.Application Number) in the provided text area.<\/li>\n<li class=\"padleft\">Unless you have clicked on the wrong input box, you will not need to change the &quot;Apply to Field&quot; text area.<\/li>\n<li class=\"padleft\">Click &quot;OK&quot;.  Save and run your application.<\/li>\n<\/ol>\n<p>The below screenshot is the result set from our External table drop-down list.  Notice how even though my dataset is still small, all 50 states are available.  This is because the current table is <strong>not<\/strong> queried, but instead my external table (which contains all 50 states) is being used.<\/p>\n<p><img decoding=\"async\" class=\"border\" src=\"\/legacy\/images\/dropdowns5.JPG\"><\/p>\n<h2><a class=\"anchor\" name=\"a3\">Creating Combobox Drop-downs<\/a><\/h2>\n<p>Combobox drop-downs are a combination of a text-input box and a drop-down lists which allows users to easily search within drop-down lists.<\/p>\n<p><img decoding=\"async\" class=\"border\" style=\"float:left; height: 400px; margin-right: 3%\" src=\"\/legacy\/images\/combobox.png\"><img decoding=\"async\" style=\"float:left; height: 400px; margin-right: 1%\" class=\"border\" src=\"\/legacy\/images\/combobox1.png\"><\/p>\n<p style=\"clear:both;\" <=\"\" p=\"\">\n<p>Combobox Options<\/p>\n<ul>\n<li class=\"padleft\">Full Match &#8212; Searches records in a &quot;Contains&quot; relationship. Without this checked the default search is &quot;Starts with&quot;.<\/li>\n<\/ul>\n<div height=\"150px\" width=\"100%\" style=\"padding-bottom:0\">\n<p style=\"float:left;text-align:center; margin-right:3%;margin-bottom:0\"><img decoding=\"async\" class=\"border\" src=\"\/legacy\/images\/combobox3.png\">Checked<\/p>\n<p style=\"float:left;text-align:center;margin-bottom:0\"><img decoding=\"async\" class=\"border\" width=\"100%\" src=\"\/legacy\/images\/combobox2.png\">Unchecked<\/p>\n<p style=\"clear:both\" <=\"\" p=\"\">\n<\/div>\n<ul>\n<li class=\"padleft\">Highlight Matches &#8212; As you type, the value entered will be bolded within any matching records. See the above images for an example..<\/li>\n<li class=\"padleft\">Allow New Entries &#8212; Only available in maintainer files. With this checked, users will be able to add new values to the drop-down list upon submission.<\/li>\n<li class=\"padleft\">Tab Index &#8212; Sets the tab ordering to select the field when navigating fields via the &#39;tab&#39; key.<\/li>\n<\/ul>\n<h2><a class=\"anchor\" name=\"a4\">Creating Drop-Down Lists in the Interactive Report Template<\/a><\/h2>\n<p>The Interactive Report Template allows for two &quot;bonus&quot; drop-down list options:<\/p>\n<ul>\n<li class=\"padleft\">Button Lists<\/li>\n<li class=\"padleft\">Check Box Lists<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"border\" src=\"\/legacy\/images\/dropdowns6.JPG\"><\/p>\n<p>Both the Button List and the Check Box List allow you to create a list from the Current Application or from an External Table.<\/p>\n<p>When creating either of these lists you will have the option of specifying how wide each item is and also how many items you wish to appear on each row.<\/p>\n<p>After clicking &quot;Accept&quot;, please note that your Button\/Check Box List will still render as drop-downs in m-Painter.  Rest assured that at run-time they will appear correctly.<\/p>\n<table style=\"text-align:center;\">\n<tbody>\n<tr>\n<th>An Example of<br \/>\nthe Button List<br \/>\nFunctionality<\/th>\n<th>An Example of<br \/>\nthe Check Box List<br \/>\nFunctionality<\/th>\n<\/tr>\n<tr>\n<td style=\"width:400px;\"><img decoding=\"async\" class=\"border\" src=\"\/legacy\/images\/dropdowns7.jpg\"><\/td>\n<td style=\"width:400px;\"><img decoding=\"async\" class=\"border\" src=\"\/legacy\/images\/dropdowns8.jpg\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a class=\"anchor\" name=\"a5\">Release Notes<\/a><\/h2>\n<ul>\n<li class=\"padleft\">The method of applying Current Application drop-down lists with User Defined Field Codes of &quot;A&quot;, &quot;B&quot;, and &quot;D&quot; will continue to work for current applications but have been deprecated for future use.<\/li>\n<li class=\"padleft\">The method of applying External drop-down lists with External Objects will continue to work for current applications but have been deprecated for future use.<\/li>\n<li class=\"padleft\">The Option List template is not designed or intended to be run as a stand-alone application.<\/li>\n<li class=\"padleft\">If you select &quot;Radio Buttons&quot; and a &quot;Blank Option Text&quot;, the text will receive its own radio button.<\/li>\n<li class=\"padleft\">If you select a &quot;Drop-down List&quot; and do not enter a &quot;Blank Option Text&quot;, the user will be forced to select a drop-down value.  Furthermore, in cases of Multiple Record Retrievals and Work-with Maintenance, the user will be forced to select a value when paginating, searching, or sorting records.<\/li>\n<li class=\"padleft\">When using the &quot;Is In the List&quot; relationship with an External table drop-down list, there is a known issue with values containing spaces.<\/li>\n<\/ul>\n<p><!-- End Content --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Create Dropdowns in m-Painter Click here to view current documentation for this feature. Jump to: Creating Drop-Down Lists from the Current Application Creating Drop-Down Lists from an External Table Creating Combobox Drop-Down Lists Creating Drop-Down Lists in the Interactive Report Template Release Notes This document explains the two ways to implement drop-down lists: From the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1410,"menu_order":13,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1489","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/1489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/comments?post=1489"}],"version-history":[{"count":8,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/1489\/revisions"}],"predecessor-version":[{"id":3388,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/1489\/revisions\/3388"}],"up":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/1410"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/media?parent=1489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}