<?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 Retrieve field value to Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Retrieve-field-value-to-Macro/m-p/158275#M33419</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks man, I did it as you with the variable.&lt;/P&gt;&lt;P&gt;Aldo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 15 Aug 2010 06:34:19 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-08-15T06:34:19Z</dc:date>
    <item>
      <title>Retrieve field value to Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Retrieve-field-value-to-Macro/m-p/158273#M33417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;I have a table field named FullName.&lt;/P&gt;&lt;P&gt;How do I retrieve the value ( only 1 already selected value from the field) to a variable in a macro?&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;Dim Name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Name = ActiveDocument.Field(FullName).GetContent().String&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Aldo.&lt;/P&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Aug 2010 14:46:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Retrieve-field-value-to-Macro/m-p/158273#M33417</guid>
      <dc:creator />
      <dc:date>2010-08-12T14:46:44Z</dc:date>
    </item>
    <item>
      <title>Retrieve field value to Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Retrieve-field-value-to-Macro/m-p/158274#M33418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm lazy, so usually, I'll make a variable that is equal to:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=GetFieldSelections(FullName) or =ONLY(FullName)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;And then in my macro use:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Name = ActiveDocument.Variables(vName).GetContent.String&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If you only have one selection, you can do it without the variable using:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;set doc = ActiveDocument&lt;BR /&gt;set mySelections = doc.fields("Field").GetSelectedValues&lt;BR /&gt;mySelections.Item(0).text&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If you have more than one selection, then you have to loop through the item array.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Aug 2010 14:58:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Retrieve-field-value-to-Macro/m-p/158274#M33418</guid>
      <dc:creator />
      <dc:date>2010-08-12T14:58:31Z</dc:date>
    </item>
    <item>
      <title>Retrieve field value to Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Retrieve-field-value-to-Macro/m-p/158275#M33419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks man, I did it as you with the variable.&lt;/P&gt;&lt;P&gt;Aldo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Aug 2010 06:34:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Retrieve-field-value-to-Macro/m-p/158275#M33419</guid>
      <dc:creator />
      <dc:date>2010-08-15T06:34:19Z</dc:date>
    </item>
  </channel>
</rss>

