<?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 Re: sas studio multientry in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/sas-studio-multientry/m-p/607126#M8389</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/949"&gt;@BartDekeyser&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know I just responded to your email, but I thought I would cross-post my answer here in case others find it useful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whenever I have wanted to extract all the values from a list, I’ve done so using a #foreach loop.&amp;nbsp; I am not aware of a more direct way of obtaining the list, and this is the approach that we generally use in the tasks.&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, I would use Velocity code such as this.&amp;nbsp; It first checks to see if the list is empty, and then lists all of the items in the list:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;#if($multientrytest.size() &amp;gt; 0)
    %let List =#foreach($item in $multientrytest) $item#end;
#end&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If $multientrytest returns&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="multientry.png" style="width: 196px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34231iFDC8851C86228D41/image-size/large?v=v2&amp;amp;px=999" role="button" title="multientry.png" alt="multientry.png" /&gt;&lt;/span&gt;, then the above loop would return&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="multientryValues.png" style="width: 266px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34232i2BA0CF3DA7E9E546/image-size/large?v=v2&amp;amp;px=999" role="button" title="multientryValues.png" alt="multientryValues.png" /&gt;&lt;/span&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you still would like for the commas to appear in the list, then this version of the code does that:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;#if($multientrytest.size() &amp;gt; 0)
    %let List =#foreach($item in $multientrytest) $item#if($foreach.hasNext),#end#end;
#end&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the result would be&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="multientryValuesCommas.jpg" style="width: 239px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34233i8CFDD9E2288DE319/image-size/large?v=v2&amp;amp;px=999" role="button" title="multientryValuesCommas.jpg" alt="multientryValuesCommas.jpg" /&gt;&lt;/span&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How exactly do you want the list to appear in the generated code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for your other question, I am not aware of a way to directly list all the available methods/functions available for a certain VTL variable (I’m pretty sure I have asked a Common Task Model developer this question before and he said it wasn’t possible).&amp;nbsp; For this, I typically use the .getClass() method to find out which java class the VTL variable belongs to.&amp;nbsp; Once the java class is determined, then you reference the java documentation for that class.&amp;nbsp;For example, $multientrytest.getClass() will return class java.util.ArrayList, and then you can look at the java documentation to see the built-in methods for ArrayLists.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additionally, the &lt;A href="https://go.documentation.sas.com/?docsetId=webeditordg&amp;amp;docsetTarget=p085fk4l8vh9zvn1an0pwu0my0o0.htm&amp;amp;docsetVersion=3.8" target="_self"&gt;SAS Studio task developer’s guide&lt;/A&gt; has documentation on additional methods that have been added specifically for writing tasks. For example, there are sections in the documentation with information on additional methods available for &lt;A href="https://go.documentation.sas.com/?docsetId=webeditordg&amp;amp;docsetTarget=p0tqjwuifkrbzen1pfzrk2wls6h1.htm&amp;amp;docsetVersion=3.8" target="_self"&gt;DataSource&lt;/A&gt;, &lt;A href="https://go.documentation.sas.com/?docsetId=webeditordg&amp;amp;docsetTarget=n1muzb94wxp9vtn1j3r3uvxwm546.htm&amp;amp;docsetVersion=3.8" target="_self"&gt;Role&lt;/A&gt;, and &lt;A href="https://go.documentation.sas.com/?docsetId=webeditordg&amp;amp;docsetTarget=p0ngfo1o3nfmhgn1uyea3u396jdv.htm&amp;amp;docsetVersion=3.8" target="_self"&gt;OutputData&lt;/A&gt; elements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this is helpful. Please let me know if you have any additional questions or if this does not meet your needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Brian&lt;/P&gt;</description>
    <pubDate>Mon, 25 Nov 2019 21:12:03 GMT</pubDate>
    <dc:creator>BrianGaines</dc:creator>
    <dc:date>2019-11-25T21:12:03Z</dc:date>
    <item>
      <title>sas studio multientry</title>
      <link>https://communities.sas.com/t5/SAS-Studio/sas-studio-multientry/m-p/606947#M8376</link>
      <description>&lt;P&gt;I am designing a studio task with a multientry. I want all the values that have been added there , can be transferred to a parameter list&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can i do that ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so i can say : %let list = $multientry.getArray....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In addition is there somewhere a list of all the available VTL classes for each options.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example : i know there is a $multientry.size. but where can i find the other classes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 12:32:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/sas-studio-multientry/m-p/606947#M8376</guid>
      <dc:creator>BartDekeyser</dc:creator>
      <dc:date>2019-11-25T12:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: sas studio multientry</title>
      <link>https://communities.sas.com/t5/SAS-Studio/sas-studio-multientry/m-p/607126#M8389</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/949"&gt;@BartDekeyser&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know I just responded to your email, but I thought I would cross-post my answer here in case others find it useful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whenever I have wanted to extract all the values from a list, I’ve done so using a #foreach loop.&amp;nbsp; I am not aware of a more direct way of obtaining the list, and this is the approach that we generally use in the tasks.&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, I would use Velocity code such as this.&amp;nbsp; It first checks to see if the list is empty, and then lists all of the items in the list:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;#if($multientrytest.size() &amp;gt; 0)
    %let List =#foreach($item in $multientrytest) $item#end;
#end&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If $multientrytest returns&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="multientry.png" style="width: 196px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34231iFDC8851C86228D41/image-size/large?v=v2&amp;amp;px=999" role="button" title="multientry.png" alt="multientry.png" /&gt;&lt;/span&gt;, then the above loop would return&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="multientryValues.png" style="width: 266px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34232i2BA0CF3DA7E9E546/image-size/large?v=v2&amp;amp;px=999" role="button" title="multientryValues.png" alt="multientryValues.png" /&gt;&lt;/span&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you still would like for the commas to appear in the list, then this version of the code does that:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;#if($multientrytest.size() &amp;gt; 0)
    %let List =#foreach($item in $multientrytest) $item#if($foreach.hasNext),#end#end;
#end&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the result would be&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="multientryValuesCommas.jpg" style="width: 239px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34233i8CFDD9E2288DE319/image-size/large?v=v2&amp;amp;px=999" role="button" title="multientryValuesCommas.jpg" alt="multientryValuesCommas.jpg" /&gt;&lt;/span&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How exactly do you want the list to appear in the generated code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for your other question, I am not aware of a way to directly list all the available methods/functions available for a certain VTL variable (I’m pretty sure I have asked a Common Task Model developer this question before and he said it wasn’t possible).&amp;nbsp; For this, I typically use the .getClass() method to find out which java class the VTL variable belongs to.&amp;nbsp; Once the java class is determined, then you reference the java documentation for that class.&amp;nbsp;For example, $multientrytest.getClass() will return class java.util.ArrayList, and then you can look at the java documentation to see the built-in methods for ArrayLists.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additionally, the &lt;A href="https://go.documentation.sas.com/?docsetId=webeditordg&amp;amp;docsetTarget=p085fk4l8vh9zvn1an0pwu0my0o0.htm&amp;amp;docsetVersion=3.8" target="_self"&gt;SAS Studio task developer’s guide&lt;/A&gt; has documentation on additional methods that have been added specifically for writing tasks. For example, there are sections in the documentation with information on additional methods available for &lt;A href="https://go.documentation.sas.com/?docsetId=webeditordg&amp;amp;docsetTarget=p0tqjwuifkrbzen1pfzrk2wls6h1.htm&amp;amp;docsetVersion=3.8" target="_self"&gt;DataSource&lt;/A&gt;, &lt;A href="https://go.documentation.sas.com/?docsetId=webeditordg&amp;amp;docsetTarget=n1muzb94wxp9vtn1j3r3uvxwm546.htm&amp;amp;docsetVersion=3.8" target="_self"&gt;Role&lt;/A&gt;, and &lt;A href="https://go.documentation.sas.com/?docsetId=webeditordg&amp;amp;docsetTarget=p0ngfo1o3nfmhgn1uyea3u396jdv.htm&amp;amp;docsetVersion=3.8" target="_self"&gt;OutputData&lt;/A&gt; elements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this is helpful. Please let me know if you have any additional questions or if this does not meet your needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Brian&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 21:12:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/sas-studio-multientry/m-p/607126#M8389</guid>
      <dc:creator>BrianGaines</dc:creator>
      <dc:date>2019-11-25T21:12:03Z</dc:date>
    </item>
  </channel>
</rss>

