<?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 function in Include file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Custom-function-in-Include-file/m-p/790607#M665167</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I know there are no user-defined functions in the script, only subroutines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can, however, define your functions in a macro module and call them from your script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Rrnesto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Jan 2015 16:58:12 GMT</pubDate>
    <dc:creator>consenit</dc:creator>
    <dc:date>2015-01-14T16:58:12Z</dc:date>
    <item>
      <title>Custom function in Include file</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-function-in-Include-file/m-p/790606#M665165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know you can have sub routines in an Include file such as...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub something(param1, param2)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ...qlikview code&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you put a custom function in an Include file such as...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function GetSP(DocLibrary, DocName)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let vTitle = Title;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let vLeafName = LeafName;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tab1:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; load max(TimeLastWritten) as MAXTimeLastWritten&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from X:\TSollenberger\_QVDs\Layer1\PRD_SP_DocumentInfo.qvd (qvd)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where tp_Title = '$(vDocLibrary)'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and LeafName = '$(vDocName)';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET v_MAXTimeLastWritten = Date(peek('MAXTimeLastWritten'), '$(TimestampFormat)');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GetSP = vMAXTimeLastWritten&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any assistance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 16:51:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-function-in-Include-file/m-p/790606#M665165</guid>
      <dc:creator />
      <dc:date>2015-01-14T16:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Custom function in Include file</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-function-in-Include-file/m-p/790607#M665167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I know there are no user-defined functions in the script, only subroutines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can, however, define your functions in a macro module and call them from your script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Rrnesto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 16:58:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-function-in-Include-file/m-p/790607#M665167</guid>
      <dc:creator>consenit</dc:creator>
      <dc:date>2015-01-14T16:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Custom function in Include file</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-function-in-Include-file/m-p/790608#M665168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Ernesto mentions, functions can be written as macros, however I personally try to avoid macros. One way to achieve something similar might be to write a subroutine, and use it to set a variable. This can then be used in your script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 17:00:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-function-in-Include-file/m-p/790608#M665168</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2015-01-14T17:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Custom function in Include file</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-function-in-Include-file/m-p/790609#M665169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Easy way is using a Sub, as you are used to setting a variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sub GetSP(DocLibrary, DocName)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let vTitle = Title;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let vLeafName = LeafName;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tab1:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; load max(TimeLastWritten) as MAXTimeLastWritten&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from X:\TSollenberger\_QVDs\Layer1\PRD_SP_DocumentInfo.qvd (qvd)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where tp_Title = '$(vDocLibrary)'&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and LeafName = '$(vDocName)';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET v_MAXTimeLastWritten = Date(peek('MAXTimeLastWritten'), '$(TimestampFormat)');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vGetSPReturn = vMAXTimeLastWritten&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;end Sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 19:26:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-function-in-Include-file/m-p/790609#M665169</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2015-01-14T19:26:21Z</dc:date>
    </item>
  </channel>
</rss>

