<?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 Script macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Script-macro/m-p/1159278#M918018</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following script macro vb &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14634793737347909 jive_text_macro" jivemacro_uid="_14634793737347909" modifiedtitle="true"&gt;&lt;OL style="list-style-type: upper-alpha;"&gt;
&lt;LI&gt;&lt;/LI&gt;
&lt;/OL&gt;&lt;OL style="list-style-type: upper-alpha;"&gt;
&lt;LI&gt;Doc.FIelds("Date").SELECT A.GetContent.STRING&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/LI&gt;
&lt;/OL&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;SET Field = Doc.Fields(FieldName).GetPossibleValues&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;FOR i=0 to Field.Count-1&lt;/P&gt;
&lt;OL style="list-style-type: upper-alpha;"&gt;
&lt;LI&gt;Doc.Fields("CodeGroupe").Clear&lt;/LI&gt;
&lt;LI&gt;Doc.FIelds(FieldName).SELECT Field.Item(i).Text&lt;/LI&gt;
&lt;/OL&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;SET FlagStockSiteManquant = ActiveDocument.Variables("vFlagStockSiteManquant")&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;FlagStockSiteManquant = FlagStockSiteManquant.GetContent.STRING&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;SET Flag = ActiveDocument.Variables("vFlag")&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;Flag = Flag.GetContent.STRING&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;SET Nom = ActiveDocument.Variables("vName")&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;Nom = Nom.GetContent.STRING&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;SET Mail = ActiveDocument.Variables("vMail")&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;Mail = Mail.GetContent.STRING&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;SET Reference = ActiveDocument.Variables("vReference")&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;Reference = Reference.GetContent.STRING&lt;/P&gt;
&lt;OL style="list-style-type: upper-alpha;"&gt;
&lt;LI&gt;Doc.FIelds("Code Reference").SELECT Reference&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;NEXTNEXT &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;How could I verify if Field.Item(i).Text still possible to select after select Reference ? I some case &lt;SPAN style="font-size: 13.3333px;"&gt;Field.Item(i).Text&amp;nbsp; could not be selected after I select Reference and return wqrong values when export .&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Script macro</title>
      <link>https://community.qlik.com/t5/QlikView/Script-macro/m-p/1159278#M918018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following script macro vb &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14634793737347909 jive_text_macro" jivemacro_uid="_14634793737347909" modifiedtitle="true"&gt;&lt;OL style="list-style-type: upper-alpha;"&gt;
&lt;LI&gt;&lt;/LI&gt;
&lt;/OL&gt;&lt;OL style="list-style-type: upper-alpha;"&gt;
&lt;LI&gt;Doc.FIelds("Date").SELECT A.GetContent.STRING&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/LI&gt;
&lt;/OL&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;SET Field = Doc.Fields(FieldName).GetPossibleValues&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;FOR i=0 to Field.Count-1&lt;/P&gt;
&lt;OL style="list-style-type: upper-alpha;"&gt;
&lt;LI&gt;Doc.Fields("CodeGroupe").Clear&lt;/LI&gt;
&lt;LI&gt;Doc.FIelds(FieldName).SELECT Field.Item(i).Text&lt;/LI&gt;
&lt;/OL&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;SET FlagStockSiteManquant = ActiveDocument.Variables("vFlagStockSiteManquant")&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;FlagStockSiteManquant = FlagStockSiteManquant.GetContent.STRING&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;SET Flag = ActiveDocument.Variables("vFlag")&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;Flag = Flag.GetContent.STRING&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;SET Nom = ActiveDocument.Variables("vName")&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;Nom = Nom.GetContent.STRING&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;SET Mail = ActiveDocument.Variables("vMail")&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;Mail = Mail.GetContent.STRING&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;SET Reference = ActiveDocument.Variables("vReference")&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;Reference = Reference.GetContent.STRING&lt;/P&gt;
&lt;OL style="list-style-type: upper-alpha;"&gt;
&lt;LI&gt;Doc.FIelds("Code Reference").SELECT Reference&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;NEXTNEXT &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;How could I verify if Field.Item(i).Text still possible to select after select Reference ? I some case &lt;SPAN style="font-size: 13.3333px;"&gt;Field.Item(i).Text&amp;nbsp; could not be selected after I select Reference and return wqrong values when export .&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-macro/m-p/1159278#M918018</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Script macro</title>
      <link>https://community.qlik.com/t5/QlikView/Script-macro/m-p/1159279#M918019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not really sure, but the reference doesn't seem to change during your for loop, is this true?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe get all variables in the beginning of your code, and set the reference to code reference before retrieving the possible values for FieldName.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 10:35:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-macro/m-p/1159279#M918019</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-17T10:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Script macro</title>
      <link>https://community.qlik.com/t5/QlikView/Script-macro/m-p/1159280#M918020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No , &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;reference&amp;nbsp; change for every &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Field.Item(i).Text&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 10:36:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-macro/m-p/1159280#M918020</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-17T10:36:11Z</dc:date>
    </item>
  </channel>
</rss>

