{"id":937,"date":"2015-02-03T10:58:13","date_gmt":"2015-02-03T02:58:13","guid":{"rendered":"http:\/\/cadrondemo01\/help\/?page_id=937"},"modified":"2024-11-06T12:34:06","modified_gmt":"2024-11-06T04:34:06","slug":"combo-box-4-3-2","status":"publish","type":"page","link":"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/controls\/combo-box\/combo-box-4-3-2\/","title":{"rendered":"Combo Box (4.3.2)"},"content":{"rendered":"\n<p class=\"left-bar\">This article applies to versions 4.3.2 and earlier of P2 Explorer. For help on the latest version of the Combo Box, see <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/controls\/combo-box\/\">Combo Box<\/a>.<\/p>\n<h3 class=\"page-subheading\">Overview<\/h3>\n<p class=\"intro-text\">A Combo Box displays values in a drop-down list. It is often used to enable the user to select a value to pass to other components\u00a0on the page.<\/p>\n<p class=\"intro-text\">The following diagram shows a simple combo box added to a <a title=\"Grid Layout\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/controls\/grid-layout\/\">grid layout<\/a>, which takes values directly entered into the configuration options:<\/p>\n<div><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/combobox1.png\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2076\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/combobox1-800x405.png\" alt=\"combobox\" width=\"800\" height=\"405\" \/><\/a> <i class=\"fa fa-search-plus\"><\/i><\/div>\n<table>\n<tbody>\n<tr>\n<td width=\"130\"><strong>Option Values<\/strong>:<\/td>\n<td>The text that you want the combo box to pass to the event it publishes. This can either be a set of values in text format, or you can populate the values from an event.<\/td>\n<\/tr>\n<tr>\n<td width=\"130\"><strong>Option Names<\/strong>:<\/td>\n<td>The text that you want the combo box to display in the drop-down. This can either be a set of values in text format, or you can populate the values from an event.<\/td>\n<\/tr>\n<tr>\n<td><strong>Selected Option<\/strong>:<\/td>\n<td>The name of the event that is published\u00a0when the user selects a value from this combo box.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<hr \/>\n<h3 class=\"page-subheading\">Tutorial<\/h3>\n<p class=\"intro-text\">Combo boxes are a simple yet powerful way of providing interactivity on your dashboards. You can pass the selected value to other controls on the dashboard by publishing an event through the Selected Option field.<\/p>\n<p class=\"intro-text\">An event is something that causes a change on the page. For example, you could have a combo box that has several different options. Perhaps you want to have a chart that updates when a different selection is made from the combo box.<\/p>\n<p class=\"intro-text\">In this tutorial, we'll look at adding a slightly more advanced combo box than that shown above. This combo box will get a list of currency values from an event, and will display friendly names in the drop-down list. By default, the combo box\u00a0will display Australian Dollars. To top it off, we'll show another control consuming the published event when a user selects something from the combo box.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2079 size-full\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxexpanded.png\" alt=\"comboboxexpanded\" width=\"184\" height=\"170\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxexpanded.png 184w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxexpanded-150x139.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxexpanded-24x22.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxexpanded-36x33.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxexpanded-48x44.png 48w\" sizes=\"auto, (max-width: 184px) 100vw, 184px\" \/><\/p>\n<p class=\"intro-text\">Creating a combo box is simple, but requires a little preparation. Let's go through this process, step-by-step.<\/p>\n<hr \/>\n<h3 class=\"page-subheading\">Step by Step: Creating an Event Controlled\u00a0Combo Box<\/h3>\n<p class=\"intro-text\">Before you start, open a new tab in Explorer and click the \u201cCreate a New Page in Studio Mode\u201d thumbnail. Choose the <a title=\"Grid Layout\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/controls\/grid-layout\/\">grid<\/a>\u00a0layout - you can adjust the rows and columns if you like but it's not important for this exercise.<\/p>\n<p class=\"intro-text\"><strong>Step 1. Add the combo box to the page<\/strong><\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxdrag.png\" rel=\"lightbox-1\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2080 size-large\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxdrag-800x476.png\" alt=\"comboboxdrag\" width=\"800\" height=\"476\" \/><\/a><\/p>\n<p class=\"intro-text\">Drag and drop the Combo Box component\u00a0onto a grid cell.<\/p>\n<p class=\"intro-text\"><strong><br \/>\n \u00a0Step 2.\u00a0\u00a0Configure the control<\/strong><\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxoptions.png\" rel=\"lightbox-2\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2081 size-large\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxoptions-800x206.png\" alt=\"comboboxoptions\" width=\"800\" height=\"206\" \/><\/a><\/p>\n<p class=\"intro-text\">In this tutorial, we want to populate the combo box from events. The advantage in doing this is that other controls on the page can also subscribe to the same events, thus your charts and tables (for example)\u00a0can also be linked. Specify the following events:<\/p>\n<ul>\n<li class=\"intro-text\">Option Values:\u00a0 currency<\/li>\n<li class=\"intro-text\">Option Names: currencyNames<\/li>\n<li class=\"intro-text\">Selected Option: selectedOption<\/li>\n<\/ul>\n<p class=\"intro-text\">You'll notice that the Selected Option event is already filled in with a default event name. You can choose to change this name if you want, but often there's no real need to.<\/p>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\"><strong>\u00a0Step 3.\u00a0\u00a0Create the events<\/strong><\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxevents.png\" rel=\"lightbox-3\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2941 size-large\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxevents-800x468.png\" alt=\"\" width=\"800\" height=\"468\" \/><\/a><\/p>\n<p class=\"intro-text\">This is where you start to see some magic happen. You can create an\u00a0<a title=\"Events\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/events\/\">event<\/a> at any time.<\/p>\n<ul>\n<li class=\"intro-text\">Click the <em><strong>Event\u00a0Defaults<\/strong><\/em> button on the far right side of the Studio toolbar.<\/li>\n<li class=\"intro-text\">\u00a0Create\u00a0an event called <em>\"Currency\"<\/em>\u00a0with a List of the following\u00a0values: AUD, GBP, JPY, SGD, THB.<\/li>\n<li class=\"intro-text\">Create an event called <em>\"currencyNames\"<\/em> with a List of the following values: Australian Dollars, Great British Pounds, Japanese Yen, Singapore Dollars, Thai Baht.<\/li>\n<li class=\"intro-text\">Create an event called <em>\"selectedOption\"<\/em> with a Text\u00a0value of AUD.<\/li>\n<\/ul>\n<p class=\"intro-text\">In creating these events, we make them available not only to the combo box we are creating here, but also to any other controls we may want to place on the page.<\/p>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\"><strong>Step 4. Add a Text Label<\/strong><\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxtext1.png\" rel=\"lightbox-4\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2943 size-large\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxtext1-800x385.png\" alt=\"\" width=\"800\" height=\"385\" \/><\/a><\/p>\n<p class=\"intro-text\">Combo boxes don't normally do anything by themselves - you use them to drive other components. Let's add a <a title=\"Text Label\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/controls\/text-label\/\">text label<\/a> and observe it being driven by the combo box.<\/p>\n<ul>\n<li class=\"intro-text\">Drag and drop a Text Label onto another cell on the page.<\/li>\n<li class=\"intro-text\">Select the <em>Title<\/em> check box.<\/li>\n<li class=\"intro-text\">Leave <em>Underline<\/em> unselected.<\/li>\n<li class=\"intro-text\">Add the following content: Selected Currency: {{selectedOption}}\u00a0<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\"><strong>Step 5. All done!\u00a0\u00a0<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2079\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxexpanded.png\" alt=\"comboboxexpanded\" width=\"184\" height=\"170\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxexpanded.png 184w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxexpanded-150x139.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxexpanded-24x22.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxexpanded-36x33.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/comboboxexpanded-48x44.png 48w\" sizes=\"auto, (max-width: 184px) 100vw, 184px\" \/><\/p>\n<p class=\"intro-text\">Congratulations! You now have a fully functioning combo box\u00a0that displays a list of currencies.<\/p>\n<ul>\n<li class=\"intro-text\">Click the Preview\u00a0<a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/preview.png\" rel=\"lightbox-5\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2896\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/preview.png\" alt=\"preview\" width=\"13\" height=\"14\" \/><\/a>\u00a0button on the Studio toolbar to see what your page will look like in run-time.<\/li>\n<li class=\"intro-text\">When the combo box first loads, the currency is presented as in the combo box as Australian Dollars, while the text label shows AUD.<\/li>\n<li class=\"intro-text\">Watch the <em>selectedOption<\/em> value change as you choose different things from the combo box.<\/li>\n<\/ul>\n<p class=\"intro-text\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1348\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/save.png\" alt=\"save\" width=\"48\" height=\"53\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/save.png 48w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/save-22x24.png 22w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/save-33x36.png 33w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/02\/save-43x48.png 43w\" sizes=\"auto, (max-width: 48px) 100vw, 48px\" \/>\u00a0Don't forget to <a title=\"Saving Your Page\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-create-your-first-page\/saving-your-page\/\">save your page<\/a>!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A Combo Box displays values in a drop-down list. It is often used to enable the user to select a value to pass to other components\u00a0on the page. This article describes how to configure a combo box, and applies to versions 4.3.2 and earlier of P2 Explorer.<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/controls\/combo-box\/combo-box-4-3-2\/\">Read more<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":4670,"parent":12030,"menu_order":3,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[11],"tags":[16,444],"class_list":["post-937","page","type-page","status-publish","has-post-thumbnail","hentry","category-tutorial","tag-combo-box","tag-selection-lists","Product-ex"],"_links":{"self":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/937","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/comments?post=937"}],"version-history":[{"count":1,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/937\/revisions"}],"predecessor-version":[{"id":69606,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/937\/revisions\/69606"}],"up":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/12030"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media\/4670"}],"wp:attachment":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media?parent=937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/categories?post=937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/tags?post=937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}