<?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 Bundle Load Images from a Filepath in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Bundle-Load-Images-from-a-Filepath/m-p/1334071#M617874</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This post builds on Chuck Bannon's &lt;A href="https://community.qlik.com/qlik-blogpost/3145"&gt;Loading Images into QlikView&lt;/A&gt; post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a great resource to be able to easily leverage images in your QlikView development.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What we've found is that in doing this, you have to then maintain an excel file that keeps your images and your image filepaths in sync. If a file folder moves or an image name changes, the image reference will break.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead, what you can do is leverage a little bit of QlikView scripting to read every file of a specific type in a directory and load that into a table to be used.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Temp Test.png" class="jive-image image-1" src="/legacyfs/online/164674_Temp Test.png" style="height: 671px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;// Start by generating this inline table of the filetypes you're looking to grab from the filepath.&lt;/P&gt;&lt;P&gt;Imgtype:&lt;/P&gt;&lt;P&gt;Load * Inline&lt;/P&gt;&lt;P&gt;&amp;nbsp; [&lt;/P&gt;&lt;P&gt;&amp;nbsp; Imgtype&lt;/P&gt;&lt;P&gt;&amp;nbsp; png,&lt;/P&gt;&lt;P&gt;&amp;nbsp; jpg,&lt;/P&gt;&lt;P&gt;&amp;nbsp; gif&lt;/P&gt;&lt;P&gt;&amp;nbsp; ];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Here you can set the filepath where your images are stored.&lt;/P&gt;&lt;P&gt;Set vFilePath = 'Images\';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Here we go...&lt;/P&gt;&lt;P&gt;[Images]:&lt;/P&gt;&lt;P&gt;Load * Inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;Imgname, Imgfilepath, Imgtype&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vNumRows = NoOfRows('Imgtype');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For i=1 to $(vNumRows) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Let vImgtype = FieldValue('Imgtype',$(i));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; For each vFile in FileList('$(vFilePath)*.$(vImgtype)')&lt;/P&gt;&lt;P&gt;&amp;nbsp; let vImgtype = '$(vImgtype)';&lt;/P&gt;&lt;P&gt;&amp;nbsp; let vImgfilepath = '$(vFile)';&lt;/P&gt;&lt;P&gt;&amp;nbsp; let vImgname = Left(Right('$(vFile)',len('$(vFile)')-Index('$(vFile)','\',-1)),len(Right('$(vFile)',len('$(vFile)')-Index('$(vFile)','\',-1)))-4);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Concatenate&lt;/P&gt;&lt;P&gt;&amp;nbsp; Load * Inline&lt;/P&gt;&lt;P&gt;&amp;nbsp; [&lt;/P&gt;&lt;P&gt;&amp;nbsp; Imgname, Imgfilepath, Imgtype&lt;/P&gt;&lt;P&gt;&amp;nbsp; $(vImgname),$(vImgfilepath), $(vImgtype)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; let vFile = Null();&lt;/P&gt;&lt;P&gt;&amp;nbsp; let vImgName = Null(); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vImgtype = Null(); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table Imgtype;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[ImageBundle]:&lt;/P&gt;&lt;P&gt;Bundle&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;Resident Images;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 May 2017 20:29:46 GMT</pubDate>
    <dc:creator>jwbadger3</dc:creator>
    <dc:date>2017-05-24T20:29:46Z</dc:date>
    <item>
      <title>Bundle Load Images from a Filepath</title>
      <link>https://community.qlik.com/t5/QlikView/Bundle-Load-Images-from-a-Filepath/m-p/1334071#M617874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This post builds on Chuck Bannon's &lt;A href="https://community.qlik.com/qlik-blogpost/3145"&gt;Loading Images into QlikView&lt;/A&gt; post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a great resource to be able to easily leverage images in your QlikView development.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What we've found is that in doing this, you have to then maintain an excel file that keeps your images and your image filepaths in sync. If a file folder moves or an image name changes, the image reference will break.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead, what you can do is leverage a little bit of QlikView scripting to read every file of a specific type in a directory and load that into a table to be used.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Temp Test.png" class="jive-image image-1" src="/legacyfs/online/164674_Temp Test.png" style="height: 671px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;// Start by generating this inline table of the filetypes you're looking to grab from the filepath.&lt;/P&gt;&lt;P&gt;Imgtype:&lt;/P&gt;&lt;P&gt;Load * Inline&lt;/P&gt;&lt;P&gt;&amp;nbsp; [&lt;/P&gt;&lt;P&gt;&amp;nbsp; Imgtype&lt;/P&gt;&lt;P&gt;&amp;nbsp; png,&lt;/P&gt;&lt;P&gt;&amp;nbsp; jpg,&lt;/P&gt;&lt;P&gt;&amp;nbsp; gif&lt;/P&gt;&lt;P&gt;&amp;nbsp; ];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Here you can set the filepath where your images are stored.&lt;/P&gt;&lt;P&gt;Set vFilePath = 'Images\';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Here we go...&lt;/P&gt;&lt;P&gt;[Images]:&lt;/P&gt;&lt;P&gt;Load * Inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;Imgname, Imgfilepath, Imgtype&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vNumRows = NoOfRows('Imgtype');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For i=1 to $(vNumRows) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Let vImgtype = FieldValue('Imgtype',$(i));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; For each vFile in FileList('$(vFilePath)*.$(vImgtype)')&lt;/P&gt;&lt;P&gt;&amp;nbsp; let vImgtype = '$(vImgtype)';&lt;/P&gt;&lt;P&gt;&amp;nbsp; let vImgfilepath = '$(vFile)';&lt;/P&gt;&lt;P&gt;&amp;nbsp; let vImgname = Left(Right('$(vFile)',len('$(vFile)')-Index('$(vFile)','\',-1)),len(Right('$(vFile)',len('$(vFile)')-Index('$(vFile)','\',-1)))-4);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Concatenate&lt;/P&gt;&lt;P&gt;&amp;nbsp; Load * Inline&lt;/P&gt;&lt;P&gt;&amp;nbsp; [&lt;/P&gt;&lt;P&gt;&amp;nbsp; Imgname, Imgfilepath, Imgtype&lt;/P&gt;&lt;P&gt;&amp;nbsp; $(vImgname),$(vImgfilepath), $(vImgtype)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; let vFile = Null();&lt;/P&gt;&lt;P&gt;&amp;nbsp; let vImgName = Null(); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vImgtype = Null(); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table Imgtype;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[ImageBundle]:&lt;/P&gt;&lt;P&gt;Bundle&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;Resident Images;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 May 2017 20:29:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bundle-Load-Images-from-a-Filepath/m-p/1334071#M617874</guid>
      <dc:creator>jwbadger3</dc:creator>
      <dc:date>2017-05-24T20:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Bundle Load Images from a Filepath</title>
      <link>https://community.qlik.com/t5/QlikView/Bundle-Load-Images-from-a-Filepath/m-p/1334072#M617875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Nice post. You can also use QlikView Components (&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcomponents.org" rel="nofollow" target="_blank"&gt;http://qlikviewcomponents.org&lt;/A&gt;&lt;SPAN&gt;) to load images from a directory:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call Qvc.Icons('Images')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 May 2017 20:41:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bundle-Load-Images-from-a-Filepath/m-p/1334072#M617875</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2017-05-24T20:41:23Z</dc:date>
    </item>
  </channel>
</rss>

