<?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: Custom Tasks: Checking whether inputtext has a value in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Custom-Tasks-Checking-whether-inputtext-has-a-value/m-p/316248#M1586</link>
    <description>&lt;P&gt;After a bit of research and some trial and error I found that the following VTL works:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;    &amp;lt;CodeTemplate&amp;gt;
    &amp;lt;![CDATA[
#if ($textExample.empty=="false") $textExample #else NULL TEXT #end
    ]]&amp;gt;
  &amp;lt;/CodeTemplate&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So this piece of code checks whether the Input Text variable is empty/missing ("true") or non-missing ("false"). I wanted to use this for optional macro parameters that require text when creating a Tasks to create a standard macro wizard.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Dec 2016 13:37:16 GMT</pubDate>
    <dc:creator>LawrenceHW</dc:creator>
    <dc:date>2016-12-02T13:37:16Z</dc:date>
    <item>
      <title>Custom Tasks: Checking whether inputtext has a value</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Custom-Tasks-Checking-whether-inputtext-has-a-value/m-p/314068#M1512</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm finding my way around defining custom tasks within SAS Studio (v3.5) and I was wondering if there's a way of checking whether the Velocity variable for the INPUTTEXT option element exists or not. So I only want this Velocity variable to appear in the SAS code if the INPUTTEXT has been completed by the user.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 11:29:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Custom-Tasks-Checking-whether-inputtext-has-a-value/m-p/314068#M1512</guid>
      <dc:creator>LawrenceHW</dc:creator>
      <dc:date>2016-11-24T11:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Tasks: Checking whether inputtext has a value</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Custom-Tasks-Checking-whether-inputtext-has-a-value/m-p/316248#M1586</link>
      <description>&lt;P&gt;After a bit of research and some trial and error I found that the following VTL works:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;    &amp;lt;CodeTemplate&amp;gt;
    &amp;lt;![CDATA[
#if ($textExample.empty=="false") $textExample #else NULL TEXT #end
    ]]&amp;gt;
  &amp;lt;/CodeTemplate&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So this piece of code checks whether the Input Text variable is empty/missing ("true") or non-missing ("false"). I wanted to use this for optional macro parameters that require text when creating a Tasks to create a standard macro wizard.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 13:37:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Custom-Tasks-Checking-whether-inputtext-has-a-value/m-p/316248#M1586</guid>
      <dc:creator>LawrenceHW</dc:creator>
      <dc:date>2016-12-02T13:37:16Z</dc:date>
    </item>
  </channel>
</rss>

