<?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 Return Value in a SUBroutine in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Return-Value-in-a-SUBroutine/m-p/262972#M711173</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Managing return values from SUB are possible in this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) define a INLINE table VAR - it is used like a collection in VB or JavaScript&lt;BR /&gt;VAR:&lt;BR /&gt;LOAD * INLINE [ Name, Val, Dummy_Var, 42 ]&lt;/P&gt;&lt;P&gt;2) create service functions to add or delete records in VAR&lt;BR /&gt;return values in SUBs can be stored in VAR with an Var_Add() or you can store directly with an LOAD * INLINE&lt;BR /&gt;Name, Val, ReturnVal, $(xyValue)&lt;/P&gt;&lt;P&gt;3) in main-pgm use LOOKUP to read the content of the Variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Disadventages:&lt;BR /&gt;- initial effort to create service routines&lt;BR /&gt;- not very transparent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adventage:&lt;BR /&gt;- array() are possible&lt;BR /&gt;- unlimited record structure as you can create more fields in VAR&amp;nbsp; Inline&lt;BR /&gt;- the INLINE table is a normal table which can be used in your app to display your VAR-records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ralf &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Nov 2011 17:15:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-11-30T17:15:52Z</dc:date>
    <item>
      <title>Return Value in a SUBroutine</title>
      <link>https://community.qlik.com/t5/QlikView/Return-Value-in-a-SUBroutine/m-p/262968#M711169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is ther any possibility to declare an own Sub like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub isACoolName(name)&lt;/P&gt;&lt;P&gt;//return -1 or 0&lt;/P&gt;&lt;P&gt;Endsub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then use it in if expressions: if isACoolName('JanUlrich') then .... ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and how does such an return statemant have to look like?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MFG &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 11:25:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-Value-in-a-SUBroutine/m-p/262968#M711169</guid>
      <dc:creator />
      <dc:date>2011-08-10T11:25:45Z</dc:date>
    </item>
    <item>
      <title>Return Value in a SUBroutine</title>
      <link>https://community.qlik.com/t5/QlikView/Return-Value-in-a-SUBroutine/m-p/262969#M711170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub isACoolName(name)&lt;/P&gt;&lt;P&gt;isACoolName =1&lt;/P&gt;&lt;P&gt;Endsub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 12:53:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-Value-in-a-SUBroutine/m-p/262969#M711170</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-08-10T12:53:46Z</dc:date>
    </item>
    <item>
      <title>Return Value in a SUBroutine</title>
      <link>https://community.qlik.com/t5/QlikView/Return-Value-in-a-SUBroutine/m-p/262970#M711171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;okey, thanks. But i still got a problem with writing the return value into a variable or use it in another way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;things like this: &lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 1;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;a&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt; &lt;/EM&gt;&lt;SPAN style="color: #808080; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = isACoolName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('test'); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;or&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;a = call isACoolName("test");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dont seem to work. &lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;thanks for your input!&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 13:15:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-Value-in-a-SUBroutine/m-p/262970#M711171</guid>
      <dc:creator />
      <dc:date>2011-08-10T13:15:07Z</dc:date>
    </item>
    <item>
      <title>Return Value in a SUBroutine</title>
      <link>https://community.qlik.com/t5/QlikView/Return-Value-in-a-SUBroutine/m-p/262971#M711172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can't return values from subroutines.&amp;nbsp; You might like try using a $-sign expansion, though.&amp;nbsp; e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET isACoolName=('$1'='janulrich');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET a=$(isACoolName('John'));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Nov 2011 04:47:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-Value-in-a-SUBroutine/m-p/262971#M711172</guid>
      <dc:creator>gussfish</dc:creator>
      <dc:date>2011-11-04T04:47:38Z</dc:date>
    </item>
    <item>
      <title>Return Value in a SUBroutine</title>
      <link>https://community.qlik.com/t5/QlikView/Return-Value-in-a-SUBroutine/m-p/262972#M711173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Managing return values from SUB are possible in this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) define a INLINE table VAR - it is used like a collection in VB or JavaScript&lt;BR /&gt;VAR:&lt;BR /&gt;LOAD * INLINE [ Name, Val, Dummy_Var, 42 ]&lt;/P&gt;&lt;P&gt;2) create service functions to add or delete records in VAR&lt;BR /&gt;return values in SUBs can be stored in VAR with an Var_Add() or you can store directly with an LOAD * INLINE&lt;BR /&gt;Name, Val, ReturnVal, $(xyValue)&lt;/P&gt;&lt;P&gt;3) in main-pgm use LOOKUP to read the content of the Variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Disadventages:&lt;BR /&gt;- initial effort to create service routines&lt;BR /&gt;- not very transparent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adventage:&lt;BR /&gt;- array() are possible&lt;BR /&gt;- unlimited record structure as you can create more fields in VAR&amp;nbsp; Inline&lt;BR /&gt;- the INLINE table is a normal table which can be used in your app to display your VAR-records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ralf &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 17:15:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-Value-in-a-SUBroutine/m-p/262972#M711173</guid>
      <dc:creator />
      <dc:date>2011-11-30T17:15:52Z</dc:date>
    </item>
  </channel>
</rss>

