<?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 Change equal values to separate values in script editor in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Change-equal-values-to-separate-values-in-script-editor/m-p/1624462#M46483</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Assume the following simple dataset:&lt;/P&gt;&lt;P&gt;[EqualValues]:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;ZipCode,Municipality,Region,Province,MunicipalityKey,RegionIdentifier&lt;BR /&gt;4061,'West Betuwe','Unknown','Gelderland','GM1960','AM99'&lt;BR /&gt;4063,'West Betuwe','Unknown','Gelderland','GM1960','AM99'&lt;/P&gt;&lt;P&gt;4147,'West Betuwe','Unknown','Gelderland','GM1960','AM99'&lt;/P&gt;&lt;P&gt;4121,'Vijfheerenlanden','Unknown','Utrecht','GM1961','AM99'&lt;/P&gt;&lt;P&gt;4143,'Vijfheerenlanden','Unknown','Utrecht','GM1961','AM99'&lt;/P&gt;&lt;P&gt;4231,'Vijfheerenlanden','Unknown','Utrecht','GM1961','AM99'&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;What I want to achieve is the following output:&lt;/P&gt;&lt;P&gt;4061,'West Betuwe','Rivierenland','Gelderland','GM1960','AM10'&lt;BR /&gt;4063,'West Betuwe','Rivierenland','Gelderland','GM1960','AM10'&lt;/P&gt;&lt;P&gt;4147,'West Betuwe','Rivierenland','Gelderland','GM1960','AM10'&lt;/P&gt;&lt;P&gt;4121,'Vijfheerenlanden','Midden-Utrecht','Utrecht','GM1961','AM13'&lt;/P&gt;&lt;P&gt;4143,'Vijfheerenlanden','Midden-Utrecht','Utrecht','GM1961','AM13'&lt;/P&gt;&lt;P&gt;4231,'Vijfheerenlanden','Midden-Utrecht','Utrecht','GM1961','AM13'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since all values share an identifier, denoted by the GM****, a simple IF-statement in a chart expression suffices.&amp;nbsp;However, I want to change these values directly from the script editor. Do note that the RegionIdentifier variable is optional for change, not necessary.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Dec 2021 21:38:40 GMT</pubDate>
    <dc:creator>klikgevoel</dc:creator>
    <dc:date>2021-12-20T21:38:40Z</dc:date>
    <item>
      <title>Change equal values to separate values in script editor</title>
      <link>https://community.qlik.com/t5/App-Development/Change-equal-values-to-separate-values-in-script-editor/m-p/1624462#M46483</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Assume the following simple dataset:&lt;/P&gt;&lt;P&gt;[EqualValues]:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;ZipCode,Municipality,Region,Province,MunicipalityKey,RegionIdentifier&lt;BR /&gt;4061,'West Betuwe','Unknown','Gelderland','GM1960','AM99'&lt;BR /&gt;4063,'West Betuwe','Unknown','Gelderland','GM1960','AM99'&lt;/P&gt;&lt;P&gt;4147,'West Betuwe','Unknown','Gelderland','GM1960','AM99'&lt;/P&gt;&lt;P&gt;4121,'Vijfheerenlanden','Unknown','Utrecht','GM1961','AM99'&lt;/P&gt;&lt;P&gt;4143,'Vijfheerenlanden','Unknown','Utrecht','GM1961','AM99'&lt;/P&gt;&lt;P&gt;4231,'Vijfheerenlanden','Unknown','Utrecht','GM1961','AM99'&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;What I want to achieve is the following output:&lt;/P&gt;&lt;P&gt;4061,'West Betuwe','Rivierenland','Gelderland','GM1960','AM10'&lt;BR /&gt;4063,'West Betuwe','Rivierenland','Gelderland','GM1960','AM10'&lt;/P&gt;&lt;P&gt;4147,'West Betuwe','Rivierenland','Gelderland','GM1960','AM10'&lt;/P&gt;&lt;P&gt;4121,'Vijfheerenlanden','Midden-Utrecht','Utrecht','GM1961','AM13'&lt;/P&gt;&lt;P&gt;4143,'Vijfheerenlanden','Midden-Utrecht','Utrecht','GM1961','AM13'&lt;/P&gt;&lt;P&gt;4231,'Vijfheerenlanden','Midden-Utrecht','Utrecht','GM1961','AM13'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since all values share an identifier, denoted by the GM****, a simple IF-statement in a chart expression suffices.&amp;nbsp;However, I want to change these values directly from the script editor. Do note that the RegionIdentifier variable is optional for change, not necessary.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 21:38:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-equal-values-to-separate-values-in-script-editor/m-p/1624462#M46483</guid>
      <dc:creator>klikgevoel</dc:creator>
      <dc:date>2021-12-20T21:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Change equal values to separate values in script editor</title>
      <link>https://community.qlik.com/t5/App-Development/Change-equal-values-to-separate-values-in-script-editor/m-p/1624481#M46488</link>
      <description>&lt;P&gt;create a map and use it in script?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 07:19:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-equal-values-to-separate-values-in-script-editor/m-p/1624481#M46488</guid>
      <dc:creator>asinha1991</dc:creator>
      <dc:date>2019-09-17T07:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Change equal values to separate values in script editor</title>
      <link>https://community.qlik.com/t5/App-Development/Change-equal-values-to-separate-values-in-script-editor/m-p/1624487#M46491</link>
      <description>&lt;P&gt;The region is identified with MunicipalityKey or RegionIdentifier? You can use &lt;A href="https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/MappingFunctions/ApplyMap.htm" target="_self"&gt;Mapping Load&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;RegionMap:&lt;/P&gt;&lt;P&gt;Mapping Load:&lt;/P&gt;&lt;P&gt;RegionIdentifier,&lt;/P&gt;&lt;P&gt;Region&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then in load of the table:&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;ApplyMap('RegionMap', RegionIdentifier, 'Unknown')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The way it works is you map regions to identifiers (AM99 - Rivierenland) and the you apply this map. Note, one identfier needs to have one region.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 07:24:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-equal-values-to-separate-values-in-script-editor/m-p/1624487#M46491</guid>
      <dc:creator>DavidM</dc:creator>
      <dc:date>2019-09-17T07:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Change equal values to separate values in script editor</title>
      <link>https://community.qlik.com/t5/App-Development/Change-equal-values-to-separate-values-in-script-editor/m-p/1624523#M46493</link>
      <description>&lt;P&gt;As you can see the region is identified by the RegionIdentifier (ie the AM99) in this case. The AM99 simply stands for "we do not know the region". However, based on the MunicipalityKey, which has two different instances among the equally shared RegionIdentifier, we're able to solve the Region to which it belongs. As such, the MappingTable does not suffice, if I understand your proposed solution, in this example. Since MunicipalityKey GM1960 belongs to RegionIdentifier AM13, otherwise Region "Rivierenland" and the other to AM10, "Midden-Utrecht".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm hoping for a solution, if it will work in the script editor, to make a synthetic key out of RegionIdentifier and MunicipalityKey. For example:&lt;/P&gt;&lt;P&gt;RegionIdentifier&amp;amp;'-'&amp;amp;MunicipalityKey AS [SYNKEY]&lt;/P&gt;&lt;P&gt;Afterward providing a function in the script editor like: SYNKEY == 'AM99-GM1960' THEN Region IS "Rivierenland" OR SYNKEY == 'AM99-GM1961' THEN Region IS "Midden-Utrecht"&amp;nbsp;&lt;/P&gt;&lt;P&gt;Such a simple statement can easily be put inside a chart function. But that doesn't solve my problem.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 08:28:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-equal-values-to-separate-values-in-script-editor/m-p/1624523#M46493</guid>
      <dc:creator>klikgevoel</dc:creator>
      <dc:date>2019-09-17T08:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Change equal values to separate values in script editor</title>
      <link>https://community.qlik.com/t5/App-Development/Change-equal-values-to-separate-values-in-script-editor/m-p/1624535#M46494</link>
      <description>&lt;P&gt;You can create Map from two fields, like this:&lt;/P&gt;&lt;P&gt;RegionMap:&lt;/P&gt;&lt;P&gt;Mapping Load:&lt;/P&gt;&lt;P&gt;RegionIdentifier&amp;amp;'-'&amp;amp;MunicipalityKey AS Region,&lt;/P&gt;&lt;P&gt;Region&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then in load of the table:&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;ApplyMap('RegionMap', RegionIdentifier&amp;amp;'-'&amp;amp;MunicipalityKey, 'Unknown')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However in the mapping table you need to identify AM99-GM1960 as "Rivierenland" etc. I suppose you have a table from which you can load this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 08:55:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-equal-values-to-separate-values-in-script-editor/m-p/1624535#M46494</guid>
      <dc:creator>DavidM</dc:creator>
      <dc:date>2019-09-17T08:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Change equal values to separate values in script editor</title>
      <link>https://community.qlik.com/t5/App-Development/Change-equal-values-to-separate-values-in-script-editor/m-p/1624580#M46496</link>
      <description>&lt;P&gt;Hmm, so for instance if you've got +350 distinct values this means that you need to specify each distinct value with its corresponding Region name?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example,&lt;/P&gt;&lt;P&gt;GM0001-AM01, 'Name1'&lt;/P&gt;&lt;P&gt;GM0002-AM02, 'Name2'&lt;/P&gt;&lt;P&gt;GM0180-AM14, 'Name3'&lt;/P&gt;&lt;P&gt;GMXXX-AMXX, 'NameY'&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a cumbersome proces...&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 10:38:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-equal-values-to-separate-values-in-script-editor/m-p/1624580#M46496</guid>
      <dc:creator>klikgevoel</dc:creator>
      <dc:date>2019-09-17T10:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Change equal values to separate values in script editor</title>
      <link>https://community.qlik.com/t5/App-Development/Change-equal-values-to-separate-values-in-script-editor/m-p/1624637#M46500</link>
      <description>&lt;P&gt;I guess you have that information in some table from where you can load it - that's how mapping is done.As long as you have table (or can build via joins) where are all three values you're good. Otherwise you would need to create this yourself&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 12:15:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-equal-values-to-separate-values-in-script-editor/m-p/1624637#M46500</guid>
      <dc:creator>DavidM</dc:creator>
      <dc:date>2019-09-17T12:15:45Z</dc:date>
    </item>
  </channel>
</rss>

