<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Task that allows user to select from values of variable in a dataset. in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Task-that-allows-user-to-select-from-values-of-variable-in-a/m-p/297543#M1088</link>
    <description>&lt;P&gt;I was trying to build a Task using SAS/Studio that allows a user to make a select from a list of values pulled from a variable in a SAS table. &amp;nbsp;The SAMPLE task has a DISTINCT option that works that way, but it is setup for the user to first select the dataset and the variable. &amp;nbsp;For this application I want to just hard code the dataset and varaible name into the task definition. Only user input will be to pick a value from the list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So in the Sample Task they have defined this distinctEXAMPLE option that references the option named VAR.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&amp;lt;Option name="distinctEXAMPLE" inputType="distinct" source="VAR"&amp;gt;Distinct Values:&amp;lt;/Option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And the VAR option is defined earlier in the Data Sources section as:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&amp;lt;DataSources&amp;gt;
  &amp;lt;DataSource name="DATASOURCE"&amp;gt;
    &amp;lt;Roles&amp;gt;
      &amp;lt;Role type="A" maxVars="1" order="true" minVars="1" name="VAR"&amp;gt;Required variable:&amp;lt;/Role&amp;gt;
      &amp;lt;Role type="N" maxVars="0" order="true" minVars="0" name="OPTNVAR" exclude="VAR"&amp;gt;Numeric variable:&amp;lt;/Role&amp;gt;
      &amp;lt;Role type="C" maxVars="3" order="true" minVars="0" name="OPTCVAR"&amp;gt;Character variable:&amp;lt;/Role&amp;gt;
    &amp;lt;/Roles&amp;gt;
  &amp;lt;/DataSource&amp;gt;
&amp;lt;/DataSources&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So how would I modify this so that "distinctEXAMPLE" will get the list of disctinct values of the variable named "DATABASE" in&amp;nbsp;the dataset named &amp;nbsp;"MYMETA.SOURCEDB" without the user needing to first select that&amp;nbsp;dataset and variable name?&lt;/P&gt;</description>
    <pubDate>Sat, 10 Sep 2016 15:47:45 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2016-09-10T15:47:45Z</dc:date>
    <item>
      <title>Task that allows user to select from values of variable in a dataset.</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Task-that-allows-user-to-select-from-values-of-variable-in-a/m-p/297543#M1088</link>
      <description>&lt;P&gt;I was trying to build a Task using SAS/Studio that allows a user to make a select from a list of values pulled from a variable in a SAS table. &amp;nbsp;The SAMPLE task has a DISTINCT option that works that way, but it is setup for the user to first select the dataset and the variable. &amp;nbsp;For this application I want to just hard code the dataset and varaible name into the task definition. Only user input will be to pick a value from the list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So in the Sample Task they have defined this distinctEXAMPLE option that references the option named VAR.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&amp;lt;Option name="distinctEXAMPLE" inputType="distinct" source="VAR"&amp;gt;Distinct Values:&amp;lt;/Option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And the VAR option is defined earlier in the Data Sources section as:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&amp;lt;DataSources&amp;gt;
  &amp;lt;DataSource name="DATASOURCE"&amp;gt;
    &amp;lt;Roles&amp;gt;
      &amp;lt;Role type="A" maxVars="1" order="true" minVars="1" name="VAR"&amp;gt;Required variable:&amp;lt;/Role&amp;gt;
      &amp;lt;Role type="N" maxVars="0" order="true" minVars="0" name="OPTNVAR" exclude="VAR"&amp;gt;Numeric variable:&amp;lt;/Role&amp;gt;
      &amp;lt;Role type="C" maxVars="3" order="true" minVars="0" name="OPTCVAR"&amp;gt;Character variable:&amp;lt;/Role&amp;gt;
    &amp;lt;/Roles&amp;gt;
  &amp;lt;/DataSource&amp;gt;
&amp;lt;/DataSources&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So how would I modify this so that "distinctEXAMPLE" will get the list of disctinct values of the variable named "DATABASE" in&amp;nbsp;the dataset named &amp;nbsp;"MYMETA.SOURCEDB" without the user needing to first select that&amp;nbsp;dataset and variable name?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2016 15:47:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Task-that-allows-user-to-select-from-values-of-variable-in-a/m-p/297543#M1088</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-09-10T15:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Task that allows user to select from values of variable in a dataset.</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Task-that-allows-user-to-select-from-values-of-variable-in-a/m-p/311536#M1479</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You cannot currently hardcode a datasource and role in the metadata or UI elements.&amp;nbsp; So there is no way to reference the variable to use a distinct control (or any other control).&amp;nbsp; This ability is being evaluated for a future release.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Grace&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2016 21:52:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Task-that-allows-user-to-select-from-values-of-variable-in-a/m-p/311536#M1479</guid>
      <dc:creator>grace_sas</dc:creator>
      <dc:date>2016-11-14T21:52:56Z</dc:date>
    </item>
  </channel>
</rss>

