<?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 Stored Process drop down lists in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Stored-Process-drop-down-lists/m-p/711031#M218964</link>
    <description>&lt;P&gt;Good afternoon&lt;/P&gt;&lt;P&gt;I have a stored process which has a dropdown list that feeds off a table and displays one question at a time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to put a text box next to the drop down, but cannot get it to work properly. The drop down list displays on top instead of inside the drop down space (see image attached).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My original Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;file _webout;&lt;BR /&gt;set onequestion_&amp;amp;i end=eof;&lt;BR /&gt;by Drop_Down_Selection;&lt;BR /&gt;if _n_=1 and Drop_Down_Selection not in ('Free text') then do;&lt;BR /&gt;put '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;table border=1 width=100%&amp;gt;';&lt;BR /&gt;put '&amp;lt;td class="TD2" width=100%&amp;gt;' questions '&amp;lt;/td&amp;gt;';&lt;BR /&gt;put '&amp;lt;td colspan=1&amp;gt;&amp;lt;select style="text-align: right" name="dropdowntp" id="dropdowntp"&amp;gt;';&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;if _n_=1 and Drop_Down_Selection in ('Free text') then do;&lt;BR /&gt;put '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;table border=1 width=100%&amp;gt;';&lt;BR /&gt;&lt;BR /&gt;put '&amp;lt;td class="TD2" width=100%&amp;gt;' questions '&amp;lt;/td&amp;gt;';&lt;BR /&gt;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;if first.Drop_Down_Selection and Drop_Down_Selection not= 'Free text' then&lt;BR /&gt;if "&amp;amp;answer." = Drop_Down_Selection then&lt;BR /&gt;put '&amp;lt;option value="' Drop_Down_Selection '"' Drop_Down_Selection ' selected&amp;gt;' Drop_Down_Selection '&amp;lt;/option&amp;gt;';&lt;BR /&gt;else&lt;BR /&gt;put '&amp;lt;option value="' Drop_Down_Selection '"' Drop_Down_Selection '&amp;gt;' Drop_Down_Selection '&amp;lt;/option&amp;gt;';&lt;BR /&gt;&lt;BR /&gt;if first.Drop_Down_Selection and Drop_Down_Selection = 'Free text' then&lt;BR /&gt;put '&amp;lt;td&amp;gt;&amp;lt;input type="text" id="dropdowntp" name="dropdowntp" value='"&amp;amp;answer."'&amp;gt;&amp;lt;/td&amp;gt;';&lt;BR /&gt;&lt;BR /&gt;if eof then do;&lt;BR /&gt;put '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;BR /&gt;put '&amp;lt;/td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/table&amp;gt;';&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Changed code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;file _webout;&lt;BR /&gt;set onequestion_&amp;amp;i end=eof;&lt;BR /&gt;by Drop_Down_Selection;&lt;BR /&gt;if _n_=1 and Drop_Down_Selection not in ('Free text') then do;&lt;BR /&gt;put '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;table border=2 width=100%&amp;gt;';&lt;BR /&gt;put '&amp;lt;td class="TD2" width=100%&amp;gt;' questions '&amp;lt;/td&amp;gt;';&lt;BR /&gt;put '&amp;lt;td colspan=1&amp;gt;&amp;lt;select style="text-align: right" name="dropdowntp" id="dropdowntp"&amp;gt;';&lt;BR /&gt;put '&amp;lt;td&amp;gt;&amp;lt;input type="text" id="dropdownmul" name="dropdownmul" value='"&amp;amp;answer."'&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;/td&amp;gt;';&lt;BR /&gt;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;if _n_=1 and Drop_Down_Selection in ('Free text') then do;&lt;BR /&gt;put '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;table border=1 width=100%&amp;gt;';&lt;BR /&gt;put '&amp;lt;td class="TD2" width=100%&amp;gt;' questions '&amp;lt;/td&amp;gt;';&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if first.Drop_Down_Selection and Drop_Down_Selection not= 'Free text' then&lt;BR /&gt;if "&amp;amp;answer." = Drop_Down_Selection then do;&lt;BR /&gt;put '&amp;lt;td&amp;gt;&amp;lt;option value="' Drop_Down_Selection '"' Drop_Down_Selection ' selected&amp;gt;' Drop_Down_Selection '&amp;lt;/option&amp;gt;';&lt;BR /&gt;put '&amp;lt;input type="text" id="dropdownmul" name="dropdownmul" value='"thisone"'&amp;gt;&amp;lt;/td&amp;gt;';&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;else do;&lt;BR /&gt;put '&amp;lt;option value="' Drop_Down_Selection '"' Drop_Down_Selection '&amp;gt;' Drop_Down_Selection '&amp;lt;/option&amp;gt;';&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;if first.Drop_Down_Selection and Drop_Down_Selection = 'Free text' then&lt;BR /&gt;put '&amp;lt;td&amp;gt;&amp;lt;input type="text" id="dropdowntp" name="dropdowntp" value='"&amp;amp;answer."'&amp;gt;&amp;lt;/td&amp;gt;';&lt;BR /&gt;&lt;BR /&gt;if eof then do;&lt;BR /&gt;put '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;BR /&gt;put '&amp;lt;/td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/table&amp;gt;';&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jan 2021 10:54:32 GMT</pubDate>
    <dc:creator>JackieR</dc:creator>
    <dc:date>2021-01-13T10:54:32Z</dc:date>
    <item>
      <title>Stored Process drop down lists</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Stored-Process-drop-down-lists/m-p/711031#M218964</link>
      <description>&lt;P&gt;Good afternoon&lt;/P&gt;&lt;P&gt;I have a stored process which has a dropdown list that feeds off a table and displays one question at a time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to put a text box next to the drop down, but cannot get it to work properly. The drop down list displays on top instead of inside the drop down space (see image attached).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My original Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;file _webout;&lt;BR /&gt;set onequestion_&amp;amp;i end=eof;&lt;BR /&gt;by Drop_Down_Selection;&lt;BR /&gt;if _n_=1 and Drop_Down_Selection not in ('Free text') then do;&lt;BR /&gt;put '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;table border=1 width=100%&amp;gt;';&lt;BR /&gt;put '&amp;lt;td class="TD2" width=100%&amp;gt;' questions '&amp;lt;/td&amp;gt;';&lt;BR /&gt;put '&amp;lt;td colspan=1&amp;gt;&amp;lt;select style="text-align: right" name="dropdowntp" id="dropdowntp"&amp;gt;';&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;if _n_=1 and Drop_Down_Selection in ('Free text') then do;&lt;BR /&gt;put '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;table border=1 width=100%&amp;gt;';&lt;BR /&gt;&lt;BR /&gt;put '&amp;lt;td class="TD2" width=100%&amp;gt;' questions '&amp;lt;/td&amp;gt;';&lt;BR /&gt;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;if first.Drop_Down_Selection and Drop_Down_Selection not= 'Free text' then&lt;BR /&gt;if "&amp;amp;answer." = Drop_Down_Selection then&lt;BR /&gt;put '&amp;lt;option value="' Drop_Down_Selection '"' Drop_Down_Selection ' selected&amp;gt;' Drop_Down_Selection '&amp;lt;/option&amp;gt;';&lt;BR /&gt;else&lt;BR /&gt;put '&amp;lt;option value="' Drop_Down_Selection '"' Drop_Down_Selection '&amp;gt;' Drop_Down_Selection '&amp;lt;/option&amp;gt;';&lt;BR /&gt;&lt;BR /&gt;if first.Drop_Down_Selection and Drop_Down_Selection = 'Free text' then&lt;BR /&gt;put '&amp;lt;td&amp;gt;&amp;lt;input type="text" id="dropdowntp" name="dropdowntp" value='"&amp;amp;answer."'&amp;gt;&amp;lt;/td&amp;gt;';&lt;BR /&gt;&lt;BR /&gt;if eof then do;&lt;BR /&gt;put '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;BR /&gt;put '&amp;lt;/td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/table&amp;gt;';&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Changed code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;file _webout;&lt;BR /&gt;set onequestion_&amp;amp;i end=eof;&lt;BR /&gt;by Drop_Down_Selection;&lt;BR /&gt;if _n_=1 and Drop_Down_Selection not in ('Free text') then do;&lt;BR /&gt;put '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;table border=2 width=100%&amp;gt;';&lt;BR /&gt;put '&amp;lt;td class="TD2" width=100%&amp;gt;' questions '&amp;lt;/td&amp;gt;';&lt;BR /&gt;put '&amp;lt;td colspan=1&amp;gt;&amp;lt;select style="text-align: right" name="dropdowntp" id="dropdowntp"&amp;gt;';&lt;BR /&gt;put '&amp;lt;td&amp;gt;&amp;lt;input type="text" id="dropdownmul" name="dropdownmul" value='"&amp;amp;answer."'&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;/td&amp;gt;';&lt;BR /&gt;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;if _n_=1 and Drop_Down_Selection in ('Free text') then do;&lt;BR /&gt;put '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;table border=1 width=100%&amp;gt;';&lt;BR /&gt;put '&amp;lt;td class="TD2" width=100%&amp;gt;' questions '&amp;lt;/td&amp;gt;';&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if first.Drop_Down_Selection and Drop_Down_Selection not= 'Free text' then&lt;BR /&gt;if "&amp;amp;answer." = Drop_Down_Selection then do;&lt;BR /&gt;put '&amp;lt;td&amp;gt;&amp;lt;option value="' Drop_Down_Selection '"' Drop_Down_Selection ' selected&amp;gt;' Drop_Down_Selection '&amp;lt;/option&amp;gt;';&lt;BR /&gt;put '&amp;lt;input type="text" id="dropdownmul" name="dropdownmul" value='"thisone"'&amp;gt;&amp;lt;/td&amp;gt;';&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;else do;&lt;BR /&gt;put '&amp;lt;option value="' Drop_Down_Selection '"' Drop_Down_Selection '&amp;gt;' Drop_Down_Selection '&amp;lt;/option&amp;gt;';&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;if first.Drop_Down_Selection and Drop_Down_Selection = 'Free text' then&lt;BR /&gt;put '&amp;lt;td&amp;gt;&amp;lt;input type="text" id="dropdowntp" name="dropdowntp" value='"&amp;amp;answer."'&amp;gt;&amp;lt;/td&amp;gt;';&lt;BR /&gt;&lt;BR /&gt;if eof then do;&lt;BR /&gt;put '&amp;lt;/select&amp;gt;&amp;lt;/td&amp;gt;';&lt;BR /&gt;put '&amp;lt;/td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/table&amp;gt;';&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2021 10:54:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Stored-Process-drop-down-lists/m-p/711031#M218964</guid>
      <dc:creator>JackieR</dc:creator>
      <dc:date>2021-01-13T10:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Stored Process drop down lists</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Stored-Process-drop-down-lists/m-p/711038#M218965</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, your question is not clear at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you provide an example onequestion_&amp;amp;i dataset in the form of a data step (you can use the data2datastep macro linked at &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_blank"&gt;https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;Based on this example can you explain how the generated HTML differs from what you expects ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, dont attach excel files to your question as many readers can't or won't open them. Use the camera icon to insert a picture instead.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="camera.png" style="width: 115px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53446i96466286F94CF64B/image-size/large?v=v2&amp;amp;px=999" role="button" title="camera.png" alt="camera.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2021 11:22:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Stored-Process-drop-down-lists/m-p/711038#M218965</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2021-01-13T11:22:44Z</dc:date>
    </item>
  </channel>
</rss>

