<?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: ODAG generated where clause not being applied during data load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/1672140#M449486</link>
    <description>&lt;P&gt;Where is the script where you applied the variable? Where clause variable (&lt;SPAN&gt;$(WHERE_PART)) looks to be good... may be it's implementation is not right?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Feb 2020 13:02:29 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2020-02-04T13:02:29Z</dc:date>
    <item>
      <title>ODAG generated where clause not being applied during data load</title>
      <link>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/1672127#M449485</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am trying to implement On Demand app generation. I have created the Selection app and the Template app. I added the following script to the Template app (see script below). The problem is that when I make selections in Selection app, the where clauses show that they have been generated however they are not applied when the data loads.&lt;/P&gt;&lt;P&gt;//Creates a WHERE statement which can be used in table loads to restrict the data to a smaller set&lt;/P&gt;&lt;P&gt;SUB ExtendWhere(Name, ValVarName)&lt;BR /&gt;LET T = Name &amp;amp; '_COLNAME';&lt;BR /&gt;LET ColName = $(T);&lt;BR /&gt;LET Values = $(ValVarName);&lt;BR /&gt;IF len(Values) &amp;gt; 0 THEN&lt;BR /&gt;IF len(WHERE_PART) &amp;gt; 0 THEN //If WHERE clause exists then extend it with further values&lt;BR /&gt;LET WHERE_PART = '$(WHERE_PART) AND MATCH($(ColName),$(Values))';&lt;BR /&gt;ELSE&lt;BR /&gt;LET WHERE_PART = ' WHERE MATCH($(ColName),$(Values))'; //If WHERE clause does not exist then create it&lt;BR /&gt;ENDIF&lt;BR /&gt;ENDIF&lt;BR /&gt;END SUB;&lt;/P&gt;&lt;P&gt;//Here we set the variables ready to hold the names of any fields we want considering for ODAG filtering (selection)&lt;BR /&gt;//The ods_ field names bind the fields to those in your Selections Application.&lt;/P&gt;&lt;P&gt;SET Sel_Implementation = ; //resets the variable from any previous reload&lt;BR /&gt;SET Sel_Implementation = $(od_Implementation); // follow 'ods_' with the field name as it appears in your UI / final load&lt;BR /&gt;SET Sel_Implementation_COLNAME ='Implementation'; // enter the field name as it appears in the source data&lt;BR /&gt;&lt;BR /&gt;SET Sel_Suffix= ;&lt;BR /&gt;SET Sel_Suffix = $(od_Suffix);&lt;BR /&gt;SET Sel_Suffix_COLNAME =Suffix;&lt;/P&gt;&lt;P&gt;SET WHERE_PART = '';&lt;BR /&gt;&lt;BR /&gt;//This section builds the WHERE_PART variables that are passed to the SUB&lt;BR /&gt;//It extracts the values that have been selected from each field&lt;/P&gt;&lt;P&gt;FOR EACH fldname IN 'Sel_Implementation', 'Sel_Suffix'&lt;BR /&gt;LET vallist = $(fldname);&lt;BR /&gt;WHEN (IsNull(vallist)) LET vallist = '';&lt;BR /&gt;IF len(vallist) &amp;gt; 0 THEN&lt;BR /&gt;CALL ExtendWhere('$(fldname)','$(vallist)');&lt;BR /&gt;ENDIF&lt;BR /&gt;NEXT fldname&lt;/P&gt;&lt;P&gt;//Evaluate the WHERE_PART variable in the script for debugging&lt;BR /&gt;TRACE Generated WHERE clause: ;&lt;BR /&gt;TRACE $(WHERE_PART);&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:10:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/1672127#M449485</guid>
      <dc:creator>brandk</dc:creator>
      <dc:date>2024-11-16T19:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: ODAG generated where clause not being applied during data load</title>
      <link>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/1672140#M449486</link>
      <description>&lt;P&gt;Where is the script where you applied the variable? Where clause variable (&lt;SPAN&gt;$(WHERE_PART)) looks to be good... may be it's implementation is not right?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 13:02:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/1672140#M449486</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-02-04T13:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: ODAG generated where clause not being applied during data load</title>
      <link>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/1672147#M449487</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp; Sorry, I am&amp;nbsp; bit lost. Are you referring to the Selection App script?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 13:34:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/1672147#M449487</guid>
      <dc:creator>brandk</dc:creator>
      <dc:date>2020-02-04T13:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: ODAG generated where clause not being applied during data load</title>
      <link>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/1672164#M449488</link>
      <description>&lt;P&gt;Nope, still talking about the template app... after creating the Where clause... you are using this somewhere, right? and that somewhere is not honoring your Where clause? Isn't it? Can you share the script for that somewhere?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 14:08:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/1672164#M449488</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-02-04T14:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: ODAG generated where clause not being applied during data load</title>
      <link>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/1672174#M449490</link>
      <description>&lt;P&gt;Okay ,I think that is where the problem lies.My understand of the ODAG functionality was that the generated where clause would be automatically injected into the script during loading. Is that not the case?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 14:22:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/1672174#M449490</guid>
      <dc:creator>brandk</dc:creator>
      <dc:date>2020-02-04T14:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: ODAG generated where clause not being applied during data load</title>
      <link>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/1672181#M449492</link>
      <description>&lt;P&gt;Well you need to apply this during your load or select statement... for example... let's say you are loading from qvd where you have both Implementation and Suffix field... this is what you will do&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LOAD *
From xyz.qvd (qvd)
$(WHERE_PART);&lt;/LI-CODE&gt;&lt;P&gt;The script is just creating the where clause for you... now you have to apply it according to your data...&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 14:30:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/1672181#M449492</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-02-04T14:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: ODAG generated where clause not being applied during data load</title>
      <link>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/1672471#M449501</link>
      <description>&lt;P&gt;Thanks a lot &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/63551"&gt;@Sunny&lt;/a&gt;_tawlar&amp;nbsp;.That helped solved the issue.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 10:53:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/1672471#M449501</guid>
      <dc:creator>brandk</dc:creator>
      <dc:date>2020-02-05T10:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: ODAG generated where clause not being applied during data load</title>
      <link>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/1672517#M449502</link>
      <description>&lt;P&gt;Awesome&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 12:52:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/1672517#M449502</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-02-05T12:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: ODAG generated where clause not being applied during data load</title>
      <link>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/2109044#M1224449</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;
&lt;P&gt;How&amp;nbsp; do you get the diagnostics in your screen shot? I have trace statements to try and get the variables passed in but don't know how to view the outputs from the trace statement when it is an odag template.&amp;nbsp; I am having problems with implementing the Where_Part and have no idea what is going into it,&lt;/P&gt;
&lt;P&gt;thanks,&lt;/P&gt;
&lt;P&gt;Gordon&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 13:08:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ODAG-generated-where-clause-not-being-applied-during-data-load/m-p/2109044#M1224449</guid>
      <dc:creator>gordon_ash</dc:creator>
      <dc:date>2023-08-23T13:08:57Z</dc:date>
    </item>
  </channel>
</rss>

