<?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: Script: Rename a value from a field at LOAD in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Script-Rename-a-value-from-a-field-at-LOAD/m-p/1640913#M732879</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;There are a few ways to do this below are two methods, method 1 is the quick and easy way if this is going to be the only value changed, method 2 allows for expansion of the number of values in that field to be changed just by adding them to the "Mapping" load. I have assumed that Field2 is the field required to be changed in my examples but you can change that as required.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Method 1&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;FIELD1,&lt;BR /&gt;IF(FIELD2='BOMOBS','OBS',FIELD2) AS FIELD2,&lt;BR /&gt;FIELD3;&lt;/P&gt;&lt;P&gt;SQL Select *&lt;BR /&gt;FROM STR.db."ITEMS"&lt;BR /&gt;Where COMPANY = 'RSM';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Method 2&lt;/P&gt;&lt;P&gt;Item_Stat_MAP:&lt;BR /&gt;MAPPING LOAD * INLINE [&lt;BR /&gt;Was, Shouldbe&lt;BR /&gt;BOMOBS, OBS&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;FIELD1,&lt;BR /&gt;ApplyMap('Item_Stat_MAP',FIELD2) AS FIELD2,&lt;BR /&gt;FIELD3;&lt;/P&gt;&lt;P&gt;SQL Select *&lt;BR /&gt;FROM STR.db."ITEMS"&lt;BR /&gt;Where COMPANY = 'RSM';&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Adrian&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Oct 2019 15:35:46 GMT</pubDate>
    <dc:creator>atoz1158</dc:creator>
    <dc:date>2019-10-29T15:35:46Z</dc:date>
    <item>
      <title>Script: Rename a value from a field at LOAD</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Rename-a-value-from-a-field-at-LOAD/m-p/1640876#M732878</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I use data from our ERP to make tables. The script used is:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;"FIELD1",&lt;BR /&gt;"FIELD2",&lt;BR /&gt;"FIELD3";&lt;/P&gt;&lt;P&gt;SQL Select *&lt;BR /&gt;FROM STR.db."ITEMS"&lt;BR /&gt;Where COMPANY = 'RSM';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a field in particular that contains 2 values that I'd like to rename as the same&amp;nbsp;&lt;/P&gt;&lt;P&gt;Field = "Item_Status"&amp;nbsp; &amp;nbsp; &amp;nbsp; --&amp;nbsp; Values available are: ACT, OBS, BOMOBS&lt;/P&gt;&lt;P&gt;I would like to replace all values "BOMOBS" by "OBS"&lt;/P&gt;&lt;P&gt;What would be the best way to do it in my script ?&lt;BR /&gt;&lt;BR /&gt;Thank you for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:05:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Rename-a-value-from-a-field-at-LOAD/m-p/1640876#M732878</guid>
      <dc:creator>fgirardin</dc:creator>
      <dc:date>2024-11-16T02:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Script: Rename a value from a field at LOAD</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Rename-a-value-from-a-field-at-LOAD/m-p/1640913#M732879</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;There are a few ways to do this below are two methods, method 1 is the quick and easy way if this is going to be the only value changed, method 2 allows for expansion of the number of values in that field to be changed just by adding them to the "Mapping" load. I have assumed that Field2 is the field required to be changed in my examples but you can change that as required.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Method 1&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;FIELD1,&lt;BR /&gt;IF(FIELD2='BOMOBS','OBS',FIELD2) AS FIELD2,&lt;BR /&gt;FIELD3;&lt;/P&gt;&lt;P&gt;SQL Select *&lt;BR /&gt;FROM STR.db."ITEMS"&lt;BR /&gt;Where COMPANY = 'RSM';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Method 2&lt;/P&gt;&lt;P&gt;Item_Stat_MAP:&lt;BR /&gt;MAPPING LOAD * INLINE [&lt;BR /&gt;Was, Shouldbe&lt;BR /&gt;BOMOBS, OBS&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;FIELD1,&lt;BR /&gt;ApplyMap('Item_Stat_MAP',FIELD2) AS FIELD2,&lt;BR /&gt;FIELD3;&lt;/P&gt;&lt;P&gt;SQL Select *&lt;BR /&gt;FROM STR.db."ITEMS"&lt;BR /&gt;Where COMPANY = 'RSM';&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Adrian&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 15:35:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Rename-a-value-from-a-field-at-LOAD/m-p/1640913#M732879</guid>
      <dc:creator>atoz1158</dc:creator>
      <dc:date>2019-10-29T15:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Script: Rename a value from a field at LOAD</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Rename-a-value-from-a-field-at-LOAD/m-p/1640915#M732880</link>
      <description>&lt;P&gt;Thank you, the method 1 works perfectly !&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fabien&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 15:40:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Rename-a-value-from-a-field-at-LOAD/m-p/1640915#M732880</guid>
      <dc:creator>fgirardin</dc:creator>
      <dc:date>2019-10-29T15:40:40Z</dc:date>
    </item>
  </channel>
</rss>

