<?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 Check if date exists in table - script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Check-if-date-exists-in-table-script/m-p/1398636#M808232</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am trying to put an if statement in my script to say that if date(today())&amp;nbsp; is included in a list of dates then run the script otherwise exit script.&lt;/P&gt;&lt;P&gt;so i have a list of dates that i would first need to load in, i'm guessing as a variable, i then want to compare todays date with that variable. if a match is found then carry on with script, else exit. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am unsure on how to do this, i cam do it in the front end but obviously thats no good, i cant seem to convert it to scripting.&lt;/P&gt;&lt;P&gt;can anyone help please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>hopkinsc</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Check if date exists in table - script</title>
      <link>https://community.qlik.com/t5/QlikView/Check-if-date-exists-in-table-script/m-p/1398636#M808232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am trying to put an if statement in my script to say that if date(today())&amp;nbsp; is included in a list of dates then run the script otherwise exit script.&lt;/P&gt;&lt;P&gt;so i have a list of dates that i would first need to load in, i'm guessing as a variable, i then want to compare todays date with that variable. if a match is found then carry on with script, else exit. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am unsure on how to do this, i cam do it in the front end but obviously thats no good, i cant seem to convert it to scripting.&lt;/P&gt;&lt;P&gt;can anyone help please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-if-date-exists-in-table-script/m-p/1398636#M808232</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Check if date exists in table - script</title>
      <link>https://community.qlik.com/t5/QlikView/Check-if-date-exists-in-table-script/m-p/1398637#M808234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TableA:&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;...,&lt;/P&gt;&lt;P&gt;DateField&lt;/P&gt;&lt;P&gt;From/Resident X;&lt;/P&gt;&lt;P&gt;let vRows=NoOfRows('TableA');&lt;/P&gt;&lt;P&gt;let vToday=date(Today(),'your format');&lt;/P&gt;&lt;P&gt;let vScriptExit='Exit script;';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i=0 to $(vRows)-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vDateFromList= chr(39)&amp;amp;peek('DateField',i,'TableA')&amp;amp;chr(39);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if wildmatch(vToday, $(vDateFromList)) then&lt;/P&gt;&lt;P&gt;$(vScriptExit);&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;next i;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps,&lt;/P&gt;&lt;P&gt;Andrei&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 20:14:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-if-date-exists-in-table-script/m-p/1398637#M808234</guid>
      <dc:creator>andrei_delta</dc:creator>
      <dc:date>2017-10-19T20:14:58Z</dc:date>
    </item>
  </channel>
</rss>

