<?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: Help with script... in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-script/m-p/294697#M1193494</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone have any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jun 2011 09:14:24 GMT</pubDate>
    <dc:creator>hopkinsc</dc:creator>
    <dc:date>2011-06-20T09:14:24Z</dc:date>
    <item>
      <title>Help with script...</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-script/m-p/294696#M1193493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to do something in my script but am unsure how to..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am loading in a table and two of the fields contained in the table are :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Narrative&lt;/P&gt;&lt;P&gt;[Stock Movement Reason Code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Narrative contains a mixture of system generated descriptions and user generated descriptions for stock movements &lt;/P&gt;&lt;P&gt;i.e. Wastage, Stock Checking, Goods Receiving, Goods Returned etc &lt;/P&gt;&lt;P&gt;Most stock actions (e.g. Wastage) have been assigned with their own Stock Movement Reason Codes (Wastage is 3), but some actions (e.g. Stock Checking, Goods Received) do not have their own code, so the system allocates a ZERO to them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any SYSTEM allocated ZERO narrative will also have the date, time and user appended to the data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e. Stock Checking Variance, Mike, 20/05/11 14:21:24 whereas all other Stock Movement Reason Codes (Greater than ZERO) would be:&amp;nbsp; Stock Checking Variance (with no date /time stamp)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my app i can report all reason codes greater than ZERO, but i now want to show system codes (ZERO) also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to change the ZERO's to show a made up code instead.&lt;/P&gt;&lt;P&gt;i was thinking of using a wildmatch if statement to say something like...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if narrative = stock checking* give [Stock Movement Reason Code] 999&lt;/P&gt;&lt;P&gt;if narrative = Goods Rece* give [Stock Movement Reason Code] 888&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So then i can select 999 and ALL stock checking variances will show.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment if i select [Stock Movement Reason Code] 0 the all system generated narratives will appear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2011 12:49:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-script/m-p/294696#M1193493</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2011-06-16T12:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help with script...</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-script/m-p/294697#M1193494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone have any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2011 09:14:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-script/m-p/294697#M1193494</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2011-06-20T09:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help with script...</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-script/m-p/294698#M1193495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what your question is. I think you are asking for help on how script the wildmatch statements...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps something like this as a line in a LOAD:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pick(WildMatch(narrative, 'stock checking*', 'Goods Rece*')+1&amp;nbsp; , [Stock Movement Reason Code], 999,888) As [new Stock Movement Reason Code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The +1 allows the expression to return the [Stock Movement Reason Code] value if there is no match.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2011 09:56:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-script/m-p/294698#M1193495</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2011-06-20T09:56:14Z</dc:date>
    </item>
  </channel>
</rss>

