<?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: Rename Fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rename-Fields/m-p/1720876#M591389</link>
    <description>&lt;P&gt;In addition to the mapping-suggestion to rename all fields at once which based on an Excel source you could use a nested loop with:&lt;/P&gt;&lt;P&gt;for i = 1 to nooftables()&lt;BR /&gt;&amp;nbsp; &amp;nbsp;let vTable = tablename($(i));&lt;BR /&gt;&amp;nbsp; &amp;nbsp;for ii = 1 to nooffields('$(vTable)')&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; RenameFields:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; load&amp;nbsp; fieldname($(ii), '$(vTable)'), capitalize(replace(fieldname($(ii), '$(vTable)'), '_', ' ')) autogenerate 1;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;next&lt;BR /&gt;next&lt;/P&gt;&lt;P&gt;MapRenameFields: mapping load * resident RenameFields; drop tables&amp;nbsp;RenameFields;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;Rename Fields using MapRenameFields;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Depending on your real tables/fields you may need some further if-loops and/or where-clauses or similar stuff to skip some of them and/or to apply some more logic for adjustments/exceptions.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Marcus&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jun 2020 13:11:36 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2020-06-22T13:11:36Z</dc:date>
    <item>
      <title>Rename Fields</title>
      <link>https://community.qlik.com/t5/QlikView/Rename-Fields/m-p/1720775#M591387</link>
      <description>&lt;P&gt;I have a Qlikview script which takes data from an SQL database and then takes these fields into several different tables for reports before storing all into reports.&lt;/P&gt;&lt;P&gt;The SQL db has the field names with an underscore and not space in the field names eg ACTIVITY_MONTH, I need the fields for my report to be [Activity Month] i.e. with a space.&lt;/P&gt;&lt;P&gt;Is there a way of dynamically updating the field name in a Qlikview script (I know I can individually write ACTIVITY_MONTH AS [Activity Month] - but there are a lot of fields and wanted to do this dynamically for more flexibility?&lt;/P&gt;&lt;P&gt;In my script happy to do this either when loading from a resident table or the final part to store into a csv&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:26:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rename-Fields/m-p/1720775#M591387</guid>
      <dc:creator>jono19872002</dc:creator>
      <dc:date>2024-11-16T00:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Fields</title>
      <link>https://community.qlik.com/t5/QlikView/Rename-Fields/m-p/1720813#M591388</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you can do it through an external excel file using the script below:&lt;/P&gt;&lt;P&gt;/////&lt;BR /&gt;FieldMap:&lt;BR /&gt;mapping&lt;BR /&gt;LOAD&lt;BR /&gt;&amp;nbsp; &amp;nbsp;OldName,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;NewName&lt;BR /&gt;FROM yourExcelFilePath&lt;BR /&gt;(biff, embedded labels, table is FieldMapping$);&lt;/P&gt;&lt;P&gt;Rename Fields using FieldMap;&lt;BR /&gt;/////&lt;/P&gt;&lt;P&gt;where "Old name" is your actual field name and "NewName" is your modified field name.&lt;BR /&gt;put the code at the end of your script.&lt;/P&gt;&lt;P&gt;I hope it can helps.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 10:44:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rename-Fields/m-p/1720813#M591388</guid>
      <dc:creator>agigliotti</dc:creator>
      <dc:date>2020-06-22T10:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Fields</title>
      <link>https://community.qlik.com/t5/QlikView/Rename-Fields/m-p/1720876#M591389</link>
      <description>&lt;P&gt;In addition to the mapping-suggestion to rename all fields at once which based on an Excel source you could use a nested loop with:&lt;/P&gt;&lt;P&gt;for i = 1 to nooftables()&lt;BR /&gt;&amp;nbsp; &amp;nbsp;let vTable = tablename($(i));&lt;BR /&gt;&amp;nbsp; &amp;nbsp;for ii = 1 to nooffields('$(vTable)')&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; RenameFields:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; load&amp;nbsp; fieldname($(ii), '$(vTable)'), capitalize(replace(fieldname($(ii), '$(vTable)'), '_', ' ')) autogenerate 1;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;next&lt;BR /&gt;next&lt;/P&gt;&lt;P&gt;MapRenameFields: mapping load * resident RenameFields; drop tables&amp;nbsp;RenameFields;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;Rename Fields using MapRenameFields;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Depending on your real tables/fields you may need some further if-loops and/or where-clauses or similar stuff to skip some of them and/or to apply some more logic for adjustments/exceptions.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Marcus&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 13:11:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rename-Fields/m-p/1720876#M591389</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2020-06-22T13:11:36Z</dc:date>
    </item>
  </channel>
</rss>

