{"id":2704,"date":"2015-03-23T19:38:44","date_gmt":"2015-03-23T11:38:44","guid":{"rendered":"http:\/\/localhost\/help\/?page_id=2704"},"modified":"2018-01-04T13:30:54","modified_gmt":"2018-01-04T05:30:54","slug":"add-a-dataset","status":"publish","type":"page","link":"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/add-data\/add-a-dataset\/","title":{"rendered":"Adding a Dataset"},"content":{"rendered":"\n<p class=\"left-bar\">This article applies to versions 4.3.2 and earlier of P2 Explorer. For help on later versions, read the <a title=\"Data Selector\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/data-selector\/\">Data Selector<\/a> article.<\/p>\n<h3 class=\"page-subheading\">Overview<\/h3>\n<p class=\"intro-text\">Your dataset uses a datasource to connect to a database or other source of data. You need to <a title=\"Add Data\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/add-data\/\">add the dataset<\/a> that you require and then configure the parameters so that you can use the returned data on your page.<\/p>\n<p class=\"intro-text\">A dataset represents the results of a query on a <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/glossary\/dataset\/\">dataset datasource<\/a> defined in P2 Server.\u00a0For example, P2 Server may contain an <em>Accounting<\/em> datasource that connects to an Oracle\u00a0database.\u00a0The Accounting datasource may contain several queries that return specific data. The results of these queries are referred to as \u201cdatasets\u201d. For example, there may be a dataset for KPI targets and thresholds (<em>AccountingTargets<\/em>) or\u00a0sales (<em>AccountingSales<\/em>).<\/p>\n<p class=\"intro-text\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-2980 size-full alignnone\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/04\/3DatasetProperties-e1427896076987.png\" alt=\"\" width=\"500\" height=\"366\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/04\/3DatasetProperties-e1427896076987.png 500w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/04\/3DatasetProperties-e1427896076987-150x110.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/04\/3DatasetProperties-e1427896076987-24x18.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/04\/3DatasetProperties-e1427896076987-36x26.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/04\/3DatasetProperties-e1427896076987-48x35.png 48w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"120\"><strong>Name<\/strong>:<\/td>\n<td>The name defaults to the query name, suffixed by a number (1, 2, etc.).<\/td>\n<\/tr>\n<tr>\n<td><strong>Query<\/strong>:<\/td>\n<td>\n<p>This is the actual name of the dataset which you select when you add the dataset. You should not change this name.<\/p>\n<p><strong>Important! Understanding how the query itself works will go a great way towards alleviating confusion when building your pages.<\/strong><\/p>\n<p>The query that generates the dataset has a significant impact on your results and consequently on how you can configure your controls. If your query \u201calmost\u201d does what you want it to do, sometimes this is not enough to get you the results you want, and you may be better off writing another query.<\/p>\n<p>As an example, your query (stored in P2 Server) may be constructed in such a way as to require you to filter data in a certain way when you add the dataset to Explorer, so that your dataset only shows a subset of all available entities. For example, you might have a query with a \u201cname\u201d parameter which is used to filter the entities in the dataset results. If you use this query, your dataset will not list all available entities \u2013 it will only list the entities that have been filtered by the \u201cname\u201d parameter. This means that if you want to add, say, a combo box that lists all available entities from the dataset, the combo box will only be able to display the\u00a0entities that have been filtered by the \u201cname\u201d parameter.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><strong>Parameters<\/strong>:<\/td>\n<td>\n<p>Every dataset has parameters, which are used within the query to filter results. You can set fixed parameters, or use events to set variable parameters. Explorer displays the <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/glossary\/data-type\/\">data type<\/a> of the parameter, and your parameter (event or actual) must match this (for example Number, Datetime, Text, List etc.).<\/p>\n<p>When configuring the parameters of a dataset, it is assumed that you are familiar with the query used by the dataset and what sort of results you expect.<\/p>\n<p>Some examples of what your parameters could look like:<\/p>\n<ul>\n<li><em>Year<\/em>: (Number) 2014<\/li>\n<li><em>Month<\/em>: (Number) 11<\/li>\n<li><em>Area<\/em>: (Event)\u00a0selectedArea<\/li>\n<\/ul>\n<p><strong>Tip<\/strong>: The parameters are case sensitive, so if something doesn't work the way you expect it to, try using different combinations of upper case and lower case.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><strong>Preview<\/strong>:\u00a0<\/td>\n<td>\n<p>When you have set up the parameters, you should be able to see some data. Clicking <strong>Preview<\/strong> runs the query and displays the returned data\u00a0in a table.\u00a0You can keep this window open as you build your page.\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><strong>Publish events from dataset<\/strong>:<\/td>\n<td>\n<p>You can take a list or a single value from the dataset, and publish this as an event to be used by other controls on the page.<\/p>\n<ul>\n<li>Click <strong>Add <\/strong>to add a dataset event. Choose <strong>List<\/strong> (default) or <strong>Single<\/strong> <em>(see below)<\/em>.<\/li>\n<li>Click <strong>Remove <\/strong>if you want to remove an event.<\/li>\n<\/ul>\n<p><strong>List<\/strong>:<strong><em>\u00a0<\/em><\/strong>Here your event is a list of values, such as when you want to use this list in a combo box.\u00a0Example:\u00a0Assign <strong>Event<\/strong> <em>Areas<\/em>, with the values of <strong>Column <\/strong><em>Area<\/em>, and make the list <strong>Distinct<\/strong> (no duplicates).\u00a0(This will assign the list of areas from the query results, to the <em>Areas<\/em> event.)<\/p>\n<ul>\n<li><em><strong>Event<\/strong><\/em>:\u00a0Give the event a meaningful name.<\/li>\n<li><em><strong>Column<\/strong><\/em>:\u00a0The dataset column whose values are published in the event list.<\/li>\n<li><em><strong>Distinct<\/strong><\/em>:\u00a0Select this option if you only want distinct items to show in your list (de-duplicated).<\/li>\n<\/ul>\n<p><strong>Single<\/strong>:\u00a0Here your event is a single value from a specified column. This would be a good event to use in a label or as a parameter to another query.\u00a0Example:\u00a0Assign <strong>Event<\/strong> <em>OilValue<\/em>, with the value of <strong>Column <\/strong><em>OIL<\/em> where column <em>Mnth<\/em> (<strong>Filter Column)<\/strong>, is equal to <em>Jul<\/em> (<strong>Filter Value<\/strong>).<br \/> (This will assign the oil sales value for the month of July, from the query results, to the <em>OilValue<\/em> event.)<\/p>\n<ul>\n<li><em><strong>Event<\/strong><\/em>:\u00a0Give the event a meaningful name.<\/li>\n<li><em><strong>Column<\/strong><\/em>:\u00a0The dataset column whose values are published in the event list.<\/li>\n<li><em><strong>Filter Column<\/strong><\/em>:\u00a0The column of the dataset that determines\u00a0the value that will be displayed.\u00a0This is used in conjunction with the <a title=\"Filter Column and Filter Value\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/filter-column-and-filter-value\/\">Filter Value<\/a>.<\/li>\n<li><em><strong>Filter Value<\/strong><\/em>: The row of the dataset that provides the value that will be displayed. This ensures that the event only gets a single value, for the specified column value.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3 class=\"page-subheading\">Tutorial Overview<\/h3>\n<div>\n<p class=\"intro-text\">The dataset control is essential for getting data onto your page. In this tutorial we\u2019ll add a dataset from the Explorer Training data datasource to populate a combo box (using the dataset event). We'll use this combo box to display some data on a chart, and then we'll update the chart to display sales data for different products.<\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalshowoff.png\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3290\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalshowoff.png\" alt=\"relationalshowoff\" width=\"681\" height=\"546\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalshowoff.png 681w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalshowoff-150x120.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalshowoff-24x19.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalshowoff-36x29.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalshowoff-48x38.png 48w\" sizes=\"auto, (max-width: 681px) 100vw, 681px\" \/><\/a><\/p>\n<\/div>\n<div>\n<p class=\"intro-text\">This tutorial is quite involved, so we'll do it in 3 parts. Let\u2019s go through this process, step-by-step.<\/p>\n<hr \/>\n<h3 class=\"page-subheading\">Tutorial 1: Adding a Dataset\u00a0to Populate a Combo 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 Layout<\/a>\u00a0\u2013 you can adjust the rows and columns if you like but it\u2019s not important for this exercise.<\/p>\n<p class=\"intro-text\">If you have access to the training environment, you can follow the steps exactly as outlined here.\u00a0Otherwise, you will need to adjust the configuration to suit your data.<\/p>\n<p class=\"intro-text\"><strong>Step 1. Add a Dataset<\/strong><\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/adddataset.png\" rel=\"lightbox-1\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-3265\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/adddataset-800x442.png\" alt=\"adddataset\" width=\"800\" height=\"442\" \/><\/a><\/p>\n<p class=\"intro-text\">This is the first step to getting your dataset working.<\/p>\n<ol>\n<li class=\"intro-text\">Click <strong>Add Data<\/strong>.<\/li>\n<li class=\"intro-text\">Select the <strong>Dataset<\/strong> option.<\/li>\n<li class=\"intro-text\">Select the <strong>Explorer Training<\/strong> datasource, from the panel on the left.<\/li>\n<li class=\"intro-text\">Select the <strong>ETASalesAreas<\/strong> dataset.<\/li>\n<li class=\"intro-text\">Click <strong>Add<\/strong>.<\/li>\n<\/ol>\n<p class=\"intro-text\">The configuration panel for the dataset will appear to the left of the canvas, with <em>Name<\/em> and <em>Query<\/em> pre-populated.<\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalconfig2.png\" rel=\"lightbox-2\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3269 size-large\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalconfig2-800x478.png\" alt=\"\" width=\"800\" height=\"478\" \/><\/a><\/p>\n<p class=\"intro-text\">\u00a0<\/p>\n<p class=\"intro-text\"><strong>Step 2. Configure the Dataset<\/strong><\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalconfig3.png\" rel=\"lightbox-3\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-3270\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalconfig3-800x443.png\" alt=\"relationalconfig3\" width=\"800\" height=\"443\" \/><\/a><\/p>\n<p class=\"intro-text\">Fill in the fields and parameters as follows:<\/p>\n<ul>\n<li class=\"intro-text\"><strong>Name<\/strong>: AreaList<\/li>\n<li class=\"intro-text\"><strong>Query<\/strong>: keep as is (ETASalesAreas)<\/li>\n<li class=\"intro-text\"><strong>Parameters<\/strong>:\n<ul>\n<li class=\"intro-text\"><strong>YTDMonth<\/strong>: (<em>Number<\/em>) 11<\/li>\n<li class=\"intro-text\"><strong>YTDYear<\/strong>: (<em>Number<\/em>) 2014<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"intro-text\">(We've added fixed parameters; you can get these to run off events if you'd prefer.)<\/p>\n<ul>\n<li class=\"intro-text\">Click <strong>Preview<\/strong> to see what the data looks like. The dataset should return a list of areas.<\/li>\n<\/ul>\n<p class=\"note\">It's a good idea to always click Preview to make sure you are getting the data you think you are.<\/p>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\"><strong>Step 3. \u00a0Publish an Event from the Dataset<\/strong><\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalevent.png\" rel=\"lightbox-4\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-3271\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalevent-800x527.png\" alt=\"relationalevent\" width=\"800\" height=\"527\" \/><\/a><\/p>\n<p class=\"intro-text\">Now that we know we've got some data, we want to display this data in a combo box. A combo box can only display data from a dataset by subscribing to an <a title=\"Events\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/events\/\">event<\/a>. So we'll get this dataset to publish an event that contains a list of values that will populate the combo box.<\/p>\n<ul>\n<li class=\"intro-text\">In the Publish events from dataset section, click <strong>Add<\/strong>.<\/li>\n<li class=\"intro-text\">Click <strong>List<\/strong>.<\/li>\n<li class=\"intro-text\">Configure the\u00a0event as follows:\n<ul>\n<li class=\"intro-text\"><strong>Event<\/strong>: Areas<\/li>\n<li class=\"intro-text\"><strong>Column<\/strong>: Area (this corresponds to the Area column when you click Preview)<\/li>\n<li class=\"intro-text\">Select <strong>Distinct<\/strong> so that there are no duplicates in the list.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"intro-text\">\u00a0<\/p>\n<p class=\"intro-text\">\u00a0<strong>Step 4.\u00a0\u00a0Display the Area List in a Combo Box<\/strong><\/p>\n<p class=\"intro-text\">\u00a0<a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalcombo.png\" rel=\"lightbox-5\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-3272\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalcombo-800x460.png\" alt=\"relationalcombo\" width=\"800\" height=\"460\" \/><\/a><\/p>\n<p class=\"intro-text\">We've now got our event sorted, but we now need to add the combo box to display it.<\/p>\n<ul>\n<li class=\"intro-text\">Drag and drop a combo box onto a grid cell.<\/li>\n<li class=\"intro-text\">Configure the combo box as follows:\n<ul>\n<li class=\"intro-text\"><strong>Option Values <\/strong>(<em>Event<\/em>): Areas<\/li>\n<li class=\"intro-text\"><strong>Option Names<\/strong>: (leave blank)<\/li>\n<li class=\"intro-text\"><strong>SelectedOption<\/strong>: selectedOption<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\"><strong>Step 5.\u00a0\u00a0Add a Default Value for the Event<\/strong><\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationaleventdefault.png\" rel=\"lightbox-6\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3273\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationaleventdefault.png\" alt=\"relationaleventdefault\" width=\"728\" height=\"363\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationaleventdefault.png 728w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationaleventdefault-150x75.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationaleventdefault-24x12.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationaleventdefault-36x18.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationaleventdefault-48x24.png 48w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/a><\/p>\n<p class=\"intro-text\">In doing this, we can populate the combo box automatically when the page loads. You can create an\u00a0<a title=\"Page 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 Defaults<\/strong><\/em> button on the far right side of the Studio toolbar.<\/li>\n<li class=\"intro-text\">Click <strong>Add<\/strong>.<\/li>\n<li class=\"intro-text\">Add an event called <em>\u201cselectedOption\u201d<\/em> with a text\u00a0value of BADGER.\u00a0(Note that <em>BADGER <\/em>was one of the values from the AreaList dataset.)<\/li>\n<\/ul>\n<p class=\"intro-text\">As soon as you add this default, the combo box updates to display the new value.<\/p>\n<p class=\"intro-text\">\u00a0<\/p>\n<p class=\"intro-text\"><strong>Step 6. Done!<\/strong><\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalcombofinal.png\" rel=\"lightbox-7\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3274\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalcombofinal.png\" alt=\"relationalcombofinal\" width=\"210\" height=\"436\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalcombofinal.png 210w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalcombofinal-72x150.png 72w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalcombofinal-12x24.png 12w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalcombofinal-17x36.png 17w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalcombofinal-23x48.png 23w\" sizes=\"auto, (max-width: 210px) 100vw, 210px\" \/><\/a><\/p>\n<p class=\"intro-text\">Congratulations! You have configured a dataset and published an event from it, which\u00a0populates a combo box.<\/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[1410] lightbox-8\"><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 the data displayed from the dataset.<\/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>!\u00a0<\/p>\n<hr \/>\n<p class=\"intro-text\">\u00a0<\/p>\n<h3 class=\"page-subheading\">Tutorial 2: Use the Combo Box to Update a Chart<\/h3>\n<p class=\"intro-text\">In the first step-by-step we added a dataset from the Explorer Training data datasource to populate a combo box (using the dataset event). Let's go a step further and use this combo box event as a parameter to another dataset. We'll then display this data in a chart.<\/p>\n<p class=\"intro-text\"><strong>Step 1.\u00a0\u00a0Add a New Dataset<\/strong><\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/adddataset2.png\" rel=\"lightbox-9\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-3277\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/adddataset2-800x442.png\" alt=\"adddataset2\" width=\"800\" height=\"442\" \/><\/a><\/p>\n<p class=\"intro-text\">First, let's add the 2nd dataset we will be working with.<\/p>\n<ol>\n<li class=\"intro-text\">Click <strong>Add Data<\/strong>.<\/li>\n<li class=\"intro-text\">Select the <strong>Dataset<\/strong> option.<\/li>\n<li class=\"intro-text\">Select the <strong>Explorer Training<\/strong> datasource, from the panel on the left.<\/li>\n<li class=\"intro-text\">Select the <strong>ETAAreaYTDSales<\/strong>\u00a0dataset.<\/li>\n<li class=\"intro-text\">Click <strong>Add<\/strong>.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\"><strong>Step 2. \u00a0Configure the Dataset to Use the Combo Box Event\u00a0as a Parameter<\/strong><\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalconfig4.png\" rel=\"lightbox-10\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3278\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalconfig4.png\" alt=\"relationalconfig4\" width=\"345\" height=\"532\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalconfig4.png 345w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalconfig4-97x150.png 97w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalconfig4-16x24.png 16w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalconfig4-23x36.png 23w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalconfig4-31x48.png 31w\" sizes=\"auto, (max-width: 345px) 100vw, 345px\" \/><\/a><\/p>\n<p class=\"intro-text\">We want to add a different dataset that contains our sales data. But we only want to show the data for the area selected by the combo box. To do this, we add the event published by the combo box as an input parameter for this dataset. Configure the dataset as follows:<\/p>\n<ul>\n<li class=\"intro-text\"><strong>Name<\/strong>: Sales<\/li>\n<li class=\"intro-text\"><strong>Query<\/strong>: (keep as is)<\/li>\n<li class=\"intro-text\"><strong>Parameters<\/strong>:\n<ul>\n<li class=\"intro-text\"><strong>Area<\/strong>: <em>(Event)<\/em>\u00a0selectedOption<\/li>\n<li class=\"intro-text\"><strong>YTDMonth<\/strong>: <em>(Number)<\/em> 11<\/li>\n<li class=\"intro-text\"><strong>YTDYear<\/strong>: <em>(Number)<\/em> 2014<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"intro-text\">Note that we've specified <em>selectedOption<\/em> as the event that drives the <em>Area<\/em> parameter.<\/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[1410] lightbox-8\"><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 the data displayed from the dataset.\u00a0<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\"><strong>Step 3.\u00a0\u00a0Add a Chart to Show YTD Sales<\/strong><\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalchart.png\" rel=\"lightbox-12\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-3279\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalchart-800x497.png\" alt=\"relationalchart\" width=\"800\" height=\"497\" \/><\/a><\/p>\n<p class=\"intro-text\">Let's add a <a title=\"Charts\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/controls\/charts\/\">Chart<\/a>\u00a0to display our data.<\/p>\n<ul>\n<li class=\"intro-text\">Drag and drop a chart onto another cell on the page, and configure an <a title=\"Area Chart\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/controls\/charts\/\">area chart<\/a>\u00a0as follows.\n<ul>\n<li class=\"intro-text\"><strong>Source Data<\/strong>: Sales<\/li>\n<\/ul>\n<\/li>\n<li class=\"intro-text\">\n<ul>\n<li class=\"intro-text\"><strong>Series<\/strong>:\n<ul>\n<li class=\"intro-text\"><strong>Type<\/strong>: Area Series<\/li>\n<li class=\"intro-text\"><strong>Y Column<\/strong>: <em>(Text)<\/em> OIL<\/li>\n<li class=\"intro-text\"><strong>Colour<\/strong>: <em>(Text)<\/em> remove the default and keep blank.<\/li>\n<li class=\"intro-text\"><strong>Colour Matcher<\/strong>: <em>(Text)\u00a0<\/em>OIL<\/li>\n<\/ul>\n<\/li>\n<li class=\"intro-text\"><strong>Axes<\/strong>:\n<ul>\n<li class=\"intro-text\"><strong>X Axis<\/strong>\n<ul>\n<li class=\"intro-text\"><strong>Column<\/strong> (text): Mnth<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\"><strong>Step 4. \u00a0Done!<\/strong><\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalglacier.png\" rel=\"lightbox-13\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3280\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalglacier.png\" alt=\"relationalglacier\" width=\"352\" height=\"421\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalglacier.png 352w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalglacier-125x150.png 125w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalglacier-20x24.png 20w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalglacier-30x36.png 30w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalglacier-40x48.png 40w\" sizes=\"auto, (max-width: 352px) 100vw, 352px\" \/><\/a><\/p>\n<p class=\"intro-text\">Congratulations! You have configured the two datasets so that you can see the available areas in a combo box, and you can view YTD Sales from a selected area.<\/p>\n<ul>\n<li class=\"intro-text\">Click the preview <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/preview.png\" rel=\"lightbox[1410] lightbox-8\"><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 <strong>Studio<\/strong> toolbar to see what your page will look like in run-time.<\/li>\n<li class=\"intro-text\">Try selecting various areas from the combo box to see the chart change.<\/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>!\u00a0<\/p>\n<hr \/>\n<p class=\"page-subheading\">\u00a0<\/p>\n<h3 class=\"page-subheading\">Tutorial 3: Use Option Links to Update the Chart<\/h3>\n<p class=\"intro-text\">In the first tutorial\u00a0we added a dataset from the Explorer Training data datasource to populate a combo box (using the dataset event). In the next one, we went a step further and used this combo box event as a parameter to another dataset for display in a chart. Now we'll add another dimension, and change the chart so that it display either oil, gas, or NGL sales for the area selected in the combo box.<\/p>\n<p class=\"intro-text\"><strong>Step 1. Add an Event Default<\/strong><\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalevent3.png\" rel=\"lightbox-15\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3286 size-large\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalevent3-800x402.png\" alt=\"\" width=\"800\" height=\"402\" \/><\/a><\/p>\n<p class=\"intro-text\">Firstly, let's add an event default that represents the product that will be chosen by the Option Links.<\/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\">Click <strong>Add<\/strong>.<\/li>\n<li class=\"intro-text\">Add an event called <em>\u201cselectedProduct\u201d<\/em> with a text\u00a0value of OIL.\u00a0<\/li>\n<\/ul>\n<p class=\"intro-text\">\u00a0<\/p>\n<p class=\"intro-text\"><strong>Step 2. Add a Label<\/strong><\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationaltext.png\" rel=\"lightbox-16\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-3287\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationaltext-800x440.png\" alt=\"relationaltext\" width=\"800\" height=\"440\" \/><\/a>\u00a0<\/p>\n<p class=\"intro-text\">Let's add a <a title=\"Text Label\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/controls\/text-label\/\" target=\"_blank\">text label<\/a>\u00a0for the title of the page, and let's use it to display the selected options from the combo box and option links.<\/p>\n<p class=\"intro-text\">Drag and drop a Text Label\u00a0component into a cell on the page, and configure it as follows:<\/p>\n<ul>\n<ul>\n<li class=\"intro-text\"><strong>Title<\/strong>: Selected<\/li>\n<li class=\"intro-text\"><strong>Content<\/strong>:\u00a0YTD Sales for {{selectedProduct}} in {{selectedOption}}<\/li>\n<\/ul>\n<\/ul>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\"><strong>Step 3. \u00a0Add Option Links<\/strong><\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationaloptionlinks.png\" rel=\"lightbox-17\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-3288\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationaloptionlinks-800x441.png\" alt=\"relationaloptionlinks\" width=\"800\" height=\"441\" \/><\/a>\u00a0<\/p>\n<p class=\"intro-text\">Let's add an <a title=\"Option Links\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-explorer\/explorer-studio\/controls\/option-links\/\">Option Links<\/a> component that will allow the user to select Oil, Gas, or NGL. The user's selection will be reflected in the text label we just added.<\/p>\n<ul>\n<li class=\"intro-text\">Drag and drop an Option Links component onto another cell, and configure it as follows:\n<ul>\n<li class=\"intro-text\"><strong>Option Values<\/strong>: <em>(List)<\/em> OIL, GAS, NGL<\/li>\n<li class=\"intro-text\"><strong>Selected Option<\/strong>: selectedProduct<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\"><strong>Step 4. Modify the Chart \u00a0Configuration<\/strong><\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalchart2.png\" rel=\"lightbox-18\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-3289\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalchart2-313x600.png\" alt=\"relationalchart2\" width=\"313\" height=\"600\" \/><\/a><\/p>\n<p class=\"intro-text\">Remember that up to this point, the chart has been configured to only show oil sales. We now have to change this so that it can also display sales for gas and NGL. This will be done by\u00a0using the <em>SelectedProduct<\/em> event in place of text for the Y Column and the Colour Matcher.<\/p>\n<ul>\n<li class=\"intro-text\">Click the chart component and reconfigure it as follows:\n<ul>\n<li class=\"intro-text\"><strong>Series<\/strong>:\n<ul>\n<li class=\"intro-text\"><strong>Y Column<\/strong>: <em>(Event)<\/em> SelectedProduct<\/li>\n<li class=\"intro-text\"><strong>Colour Matcher<\/strong>: <em>(Event)<\/em> SelectedProduct<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"note\">Don't forget to change from <em>Text<\/em> to <em>Event<\/em>, this is a common oversight.<\/p>\n<p>&nbsp;<\/p>\n<p class=\"intro-text\"><strong>Step 5.\u00a0\u00a0All done!<\/strong><\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalshowoff.png\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3290\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalshowoff.png\" alt=\"relationalshowoff\" width=\"681\" height=\"546\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalshowoff.png 681w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalshowoff-150x120.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalshowoff-24x19.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalshowoff-36x29.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/relationalshowoff-48x38.png 48w\" sizes=\"auto, (max-width: 681px) 100vw, 681px\" \/><\/a><\/p>\n<p class=\"intro-text\">Congratulations! You have configured two datasets so that you can see the available areas in a combo box, and you can view YTD Sales from a selected area and for a selected product.<\/p>\n<ul>\n<li class=\"intro-text\">Click the preview <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/03\/preview.png\" rel=\"lightbox[1410] lightbox-8\"><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 <strong>Studio<\/strong> toolbar, to see what your page will look like in run-time.<\/li>\n<li class=\"intro-text\">Try selecting various areas from the combo box, and select the different options (OIL, GAS, NGL) to see the chart change.<\/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<p>&nbsp;<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The most important thing you can do when designing a page in P2 Explorer is adding data for your page to display. This article looks at how to add datasets to your page, in 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\/add-data\/add-a-dataset\/\">Read more<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":4511,"parent":2700,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[11],"tags":[20,306],"class_list":["post-2704","page","type-page","status-publish","has-post-thumbnail","hentry","category-tutorial","tag-dataset","tag-tabular-data","Product-ex"],"_links":{"self":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/2704","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=2704"}],"version-history":[{"count":0,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/2704\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/2700"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media\/4511"}],"wp:attachment":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media?parent=2704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/categories?post=2704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/tags?post=2704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}