<?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: In a macro, fields with 8-bit names in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387575#M702109</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solution?&lt;/P&gt;&lt;P&gt;put your field "AnnéeCde" in Listbox or Tablebox and read there the possible Values&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Sep 2012 15:20:53 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2012-09-07T15:20:53Z</dc:date>
    <item>
      <title>In a macro, fields with 8-bit names</title>
      <link>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387570#M702104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Several of my fields have 8-bit names ("Année" is the French word for "year", for example).&lt;/P&gt;&lt;P&gt;It seems to be a problem when I try to access those fields in a VB macro by using ActiveDocument.Fields("Année").GetPossibleValues&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a proper way to access those fields or do I need to rename all my fields ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 13:32:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387570#M702104</guid>
      <dc:creator />
      <dc:date>2012-09-07T13:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: In a macro, fields with 8-bit names</title>
      <link>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387571#M702105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One Solution in Excel for an export to *.txt, perhaps it's helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Public Const cLetters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZäöüÄÖÜß"&lt;/P&gt;&lt;P&gt;Public Const cNumbers = "0123456789"&lt;/P&gt;&lt;P&gt;Public Const cWhiteSpaces = " " &amp;amp; vbCr &amp;amp; vbLf &amp;amp; vbTab&lt;/P&gt;&lt;P&gt;Public Const cSigns = """|!#$%&amp;amp;'()*+,-./0123456789:;&amp;lt;=&amp;gt;?@[\]^_`€Ø{}²³´–"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Public Function Filter(str As String, ByVal z As Long, ByVal s As Byte) As String&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim i As Long&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For i = 1 To Len(str)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If InStr(1, cLetters &amp;amp; cNumbers &amp;amp; cWhiteSpaces &amp;amp; cSigns &amp;amp; Chr(133) &amp;amp; Chr(160), Mid$(str, i, 1), vbTextCompare) Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Filter = Filter &amp;amp; Mid$(str, i, 1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Filter = Filter &amp;amp; "?"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'MsgBox "Zeile " &amp;amp; z &amp;amp; Chr(10) &amp;amp; "Spalte " &amp;amp; s &amp;amp; Chr(10) &amp;amp; "Zeichen: " &amp;amp; Mid$(str, i, 1) &amp;amp; " - Code: " &amp;amp; Asc(Mid$(str, i, 1))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;Next i&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 13:44:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387571#M702105</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2012-09-07T13:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: In a macro, fields with 8-bit names</title>
      <link>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387572#M702106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marcus for your transform function but my problem is that I cannot access the fields of the table "Année" by calling ActiveDocument.Fields("&lt;STRONG&gt;Annee&lt;/STRONG&gt;").GetPossibleValues&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 14:25:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387572#M702106</guid>
      <dc:creator />
      <dc:date>2012-09-07T14:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: In a macro, fields with 8-bit names</title>
      <link>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387573#M702107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is your problem trying to enter accented characters in the editor(s)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can enter accented characters in the script and module editors using the ALT key. For example é can be entered by holding down the ALT key and typing 0233. You could also select and copy the characters from the Windows character map (charmap.exe).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 14:37:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387573#M702107</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-09-07T14:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: In a macro, fields with 8-bit names</title>
      <link>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387574#M702108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jonathan, but no: it's not a proble of typing the letters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My proble is that when I try to get values of the table "DateCde" it works with :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objSelected = ActiveDocument.Fields("DateCde").GetPossibleValues&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date= objSelected.item(0).Text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While I cannot get the year in table "AnnéeCde" :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objSelected = ActiveDocument.Fields("AnnéeCde").GetPossibleValues&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date= objSelected.item(0).Text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am quite reluctant in changing (almost) all my table names...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 14:54:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387574#M702108</guid>
      <dc:creator />
      <dc:date>2012-09-07T14:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: In a macro, fields with 8-bit names</title>
      <link>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387575#M702109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solution?&lt;/P&gt;&lt;P&gt;put your field "AnnéeCde" in Listbox or Tablebox and read there the possible Values&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 15:20:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387575#M702109</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2012-09-07T15:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: In a macro, fields with 8-bit names</title>
      <link>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387576#M702110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've tried to replicate this but your code seems to work fine for me (QV10 SR4) so not sure exactly where the issue lies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That said, a way round it might be to reference the field using its integer field reference, like this ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set fld=ActiveDocument.GetFieldDescriptions(7)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set objSelected = ActiveDocument.Fields(fld.Name).GetPossibleValues&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For&amp;nbsp; i = 0 to objSelected.Count-1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MsgBox(objSelected.item(i).Text)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;next&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The trick will be to identify what the field reference actually is using this ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set flddescs = ActiveDocument.GetFieldDescriptions&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;for i = 0 to flddescs.Count - 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fdesc = flddescs(i)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox(fdesc.Name &amp;amp; " is field ref: " &amp;amp; i)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;next&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The next problem is: Will the value stay at what you find? - probably not if you insert new fields in your script, so therefore you will need to loop through all fields and set a variable when you find the one you want, something like ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set flddescs = ActiveDocument.GetFieldDescriptions&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;for i = 0 to flddescs.Count - 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fdesc = flddescs(i)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="text-decoration: line-through;"&gt;if fdesc.Name ="AnnéeCde" then set fldcode=i&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if fdesc.Name ="AnnéeCde" then &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fldcode=i&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;next&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and use fldcode as the parameter in the GetFieldDescriptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;flipside&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 18:32:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387576#M702110</guid>
      <dc:creator>flipside</dc:creator>
      <dc:date>2012-09-07T18:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: In a macro, fields with 8-bit names</title>
      <link>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387577#M702111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you flipside for the useful code that enables to get all the names of the fields. I tried to do this but did not succeed in.&lt;/P&gt;&lt;P&gt;Actually, my problem is solved and was not due to 8-bits name (but to an empty field)&lt;/P&gt;&lt;P&gt;Sorry for this and thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2012 09:26:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387577#M702111</guid>
      <dc:creator />
      <dc:date>2012-09-12T09:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: In a macro, fields with 8-bit names</title>
      <link>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387578#M702112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad you got it sorted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've corrected my dodgy code above in case it is of any use to anyone else.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2012 09:39:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/In-a-macro-fields-with-8-bit-names/m-p/387578#M702112</guid>
      <dc:creator>flipside</dc:creator>
      <dc:date>2012-09-12T09:39:58Z</dc:date>
    </item>
  </channel>
</rss>

