<?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: Loop on applymap() within a load in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Loop-on-applymap-within-a-load/m-p/1762485#M58989</link>
    <description>&lt;P&gt;Hi Fabian,&lt;BR /&gt;thank you for your reply,&lt;/P&gt;&lt;P&gt;I am following a different document but it looks like the same logic,&lt;BR /&gt;so far I am able to translate the data but because we have lots of languages and fields to translate I don't want to hardcoded applymap() to every field and language and it also may vary,&lt;BR /&gt;that why I want to create a loop within a Load statement that dos it.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Nov 2020 07:54:13 GMT</pubDate>
    <dc:creator>Amiran</dc:creator>
    <dc:date>2020-11-18T07:54:13Z</dc:date>
    <item>
      <title>Loop on applymap() within a load</title>
      <link>https://community.qlik.com/t5/App-Development/Loop-on-applymap-within-a-load/m-p/1762291#M58969</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am creating a multi-language dashboard and the translation data comes from the DB so I need to create a dynamic load in case more languages will be added (and because there is a lot of languages and fields to translate),&lt;/P&gt;&lt;P&gt;I am trying to create a load script that contains a loop to go over the applymap() and change the fields within the function,&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PLOTS:&lt;BR /&gt;LOAD&lt;BR /&gt;SECTION_ACCESS_REDUCTION,&lt;BR /&gt;SOURCE_DB,&lt;BR /&gt;PROJECT_ID,&lt;BR /&gt;PROJECT_LOCALE_MAPPER,&lt;BR /&gt;LOCATION_ID,&lt;/P&gt;&lt;P&gt;//---- Apply map() -------------------------&lt;BR /&gt;PROJECT_NAME,&lt;BR /&gt;ApplyMap('PROJECT_NAME_en',NAME) AS PROJECT_NAME_en,&lt;BR /&gt;ApplyMap('PROJECT_NAME_es',NAME) AS PROJECT_NAME_es,&lt;BR /&gt;ApplyMap('PROJECT_NAME_fr',NAME) AS PROJECT_NAME_fr,&lt;BR /&gt;ApplyMap('PROJECT_NAME_he',NAME) AS PROJECT_NAME_he,&lt;BR /&gt;...and more....&lt;BR /&gt;NAME,&lt;BR /&gt;ApplyMap('NAME_en',NAME) AS NAME_en,&lt;BR /&gt;ApplyMap('NAME_es',NAME) AS NAME_es,&lt;BR /&gt;ApplyMap('NAME_fr',NAME) AS NAME_fr,&lt;BR /&gt;ApplyMap('NAME_he',NAME) AS NAME_he,&lt;BR /&gt;......and more.......&lt;BR /&gt;CROP_NAME,&lt;BR /&gt;ApplyMap('CROP_NAME_en',CROP_NAME) AS CROP_NAME_en,&lt;BR /&gt;ApplyMap('CROP_NAME_es',CROP_NAME) AS CROP_NAME_es,&lt;BR /&gt;ApplyMap('CROP_NAME_fr',CROP_NAME) AS CROP_NAME_fr,&lt;BR /&gt;ApplyMap('CROP_NAME_he',CROP_NAME) AS CROP_NAME_he,&lt;BR /&gt;.......and more......&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FROM $(vQVD_ERD_path)PLOTS.qvd (qvd);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought about trying to create a script with a loop that will change the data within the apply map function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PLOTS:&lt;BR /&gt;LOAD&lt;BR /&gt;SECTION_ACCESS_REDUCTION,&lt;BR /&gt;SOURCE_DB,&lt;BR /&gt;PROJECT_ID,&lt;BR /&gt;PROJECT_LOCALE_MAPPER,&lt;BR /&gt;LOCATION_ID,&lt;/P&gt;&lt;P&gt;//---- Apply map() -------------------------&lt;BR /&gt;PROJECT_NAME,&lt;/P&gt;&lt;P&gt;NAME,&lt;/P&gt;&lt;P&gt;CROP_NAME,&lt;/P&gt;&lt;P&gt;For Row_num_APP_FILEDS_NAMES = 0 to vCount_SOURCE_DB-1&lt;/P&gt;&lt;P&gt;let vFILEDS_NAMES=Peek('FILEDS_NAMES' ,[Row_num_APP_FILEDS_NAMES], [APP_FILEDS_NAMES]);&lt;/P&gt;&lt;P&gt;for Row_num = 0 to vCount_Langugagess-1&lt;/P&gt;&lt;P&gt;let lang_name=Peek('language_name',[Row_num_language_name], 'Temp_language_list');&lt;BR /&gt;Let vTableName = '$(vFILEDS_NAMES)' &amp;amp; Chr(95) &amp;amp; '$(lang_name)';&lt;/P&gt;&lt;P&gt;ApplyMap('$(vTableName)',$(vFILEDS_NAMES)) AS $(vTableName)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FROM $(vQVD_ERD_path)PLOTS.qvd (qvd);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can I create a Load script that has a loop within the script and go over the applymap function without hardcoded the data for each filed and language?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 15:01:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loop-on-applymap-within-a-load/m-p/1762291#M58969</guid>
      <dc:creator>Amiran</dc:creator>
      <dc:date>2020-11-17T15:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Loop on applymap() within a load</title>
      <link>https://community.qlik.com/t5/App-Development/Loop-on-applymap-within-a-load/m-p/1762329#M58972</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would probably not go with apply map in the loop, rather I would just join (I am assuming that the source of translations can be guaranteed not to contain duplicates, that would be a reason to use apply map).&lt;/P&gt;&lt;P&gt;From there the looping would look something like the toy application attached - I've not tried to match exactly to your field/table names - but hopefully gives an idea.&lt;/P&gt;&lt;P&gt;I don't know if there is any guidance on other ways of 'localising' Qlik, as I think you might end up with an over complex application here.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 17:14:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loop-on-applymap-within-a-load/m-p/1762329#M58972</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2020-11-17T17:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Loop on applymap() within a load</title>
      <link>https://community.qlik.com/t5/App-Development/Loop-on-applymap-within-a-load/m-p/1762334#M58973</link>
      <description>&lt;P&gt;Hi, In a Qlik project you can create variables, and then use them in objects titles or texts,&amp;nbsp;&lt;/P&gt;&lt;P&gt;So you first load your dictionary of terms, then create the variables to use as titles in objects, and then have a field for select the language.&lt;/P&gt;&lt;P&gt;i fund this, i hope it helps you&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.qlikfix.com/2016/10/04/handling-multiple-languages-and-translations/" target="_blank"&gt;http://www.qlikfix.com/2016/10/04/handling-multiple-languages-and-translations/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 17:51:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loop-on-applymap-within-a-load/m-p/1762334#M58973</guid>
      <dc:creator>QFabian</dc:creator>
      <dc:date>2020-11-17T17:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Loop on applymap() within a load</title>
      <link>https://community.qlik.com/t5/App-Development/Loop-on-applymap-within-a-load/m-p/1762485#M58989</link>
      <description>&lt;P&gt;Hi Fabian,&lt;BR /&gt;thank you for your reply,&lt;/P&gt;&lt;P&gt;I am following a different document but it looks like the same logic,&lt;BR /&gt;so far I am able to translate the data but because we have lots of languages and fields to translate I don't want to hardcoded applymap() to every field and language and it also may vary,&lt;BR /&gt;that why I want to create a loop within a Load statement that dos it.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 07:54:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loop-on-applymap-within-a-load/m-p/1762485#M58989</guid>
      <dc:creator>Amiran</dc:creator>
      <dc:date>2020-11-18T07:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Loop on applymap() within a load</title>
      <link>https://community.qlik.com/t5/App-Development/Loop-on-applymap-within-a-load/m-p/1762490#M58990</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;thank you,&lt;/P&gt;&lt;P&gt;I am following documentation about how to create a multi language app,&lt;/P&gt;&lt;P&gt;If I understand you correctly you were "flatten" the data and create a long table that holds all the languages and translations as columns.&lt;/P&gt;&lt;P&gt;how can I use it in the app without applymap() and translate the data?&amp;nbsp;&lt;/P&gt;&lt;P&gt;it's supposed to work as filters?&lt;/P&gt;&lt;P&gt;I attached the document I follow along (scenario 2 in the doc).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Handling-Multiple-Languages/ba-p/1473518#comments" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/Handling-Multiple-Languages/ba-p/1473518#comments&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 08:07:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loop-on-applymap-within-a-load/m-p/1762490#M58990</guid>
      <dc:creator>Amiran</dc:creator>
      <dc:date>2020-11-18T08:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: Loop on applymap() within a load</title>
      <link>https://community.qlik.com/t5/App-Development/Loop-on-applymap-within-a-load/m-p/1762614#M58999</link>
      <description>&lt;P&gt;For me it looked as if you want to create the various translation fields within the fact-table. Personally I would tend to do this within the dimension-tables and I wouldn't try it with applymap() else rather joining the various translation-fields to the dimension-tables. For this you may use a loop-approach which looped through all available / needed languages. Should this loop really don't possible you could duplicate the fields which should be translated (for this you would need a variable created on the load-outside which returned the appropriate fields and their multiple renaming). Later the real translation is done with a Map ... using ... approach, see:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Map.htm" target="_self"&gt;https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Map.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;More easier as the above could be to concatenate all of the translations of a dimension-table into a single table by differentiating the various parts with an extra flag-field for the languages and to use them as&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130" target="_self"&gt;The-As-Of-Table.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 14:50:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loop-on-applymap-within-a-load/m-p/1762614#M58999</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2020-11-18T14:50:02Z</dc:date>
    </item>
  </channel>
</rss>

