<?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: Use of selected value in macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14245#M790059</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using the personal Edition and I got an "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;License is embedded in this document is not valid&lt;/SPAN&gt;" error. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Jan 2018 14:52:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-01-29T14:52:38Z</dc:date>
    <item>
      <title>Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14242#M790049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a macro to export some data from QlikView to Excel. In QlikView I have a multibox with a table column called "Cycle" which can take the following values:"Cycle 1",&lt;SPAN style="font-size: 13.3333px;"&gt;"Cycle 2",&lt;SPAN style="font-size: 13.3333px;"&gt;"Cycle 3" or none of these values. How can I change what my macro does, depending on whether I have selected a Cycle value or not, and the value of the said Cycle value? &lt;/SPAN&gt;&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/Use-of-selected-value-in-macro/m-p/14242#M790049</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14243#M790052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mihai&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You can get the selected value of the field with the following function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectedVaue = ActiveDocument.Fields("Name Of Your Field").GetSelectedValues.Count &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand, you can control what the macro does if you put different IF sentences inside your macro, like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If &lt;SPAN style="font-size: 13.3333px;"&gt;selectedVaue = 'Sample Value A of Cycle' Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Put the code here]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If &lt;SPAN style="font-size: 13.3333px;"&gt;selectedVaue = 'Sample Value B of Cycle' Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Put the code here]&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I've helped.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2018 13:55:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14243#M790052</guid>
      <dc:creator>danielgarciamej</dc:creator>
      <dc:date>2018-01-29T13:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14244#M790056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have a look at the QlikView api guide. There are examples for nearly everything you can do with macros:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/132321"&gt;API GUIDE&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;goto Automation exmaples tab and search for:&lt;/P&gt;&lt;P&gt;- .getselectedValues&lt;/P&gt;&lt;P&gt;- .Select&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*mousover the selected value&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/191703_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2018 13:55:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14244#M790056</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2018-01-29T13:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14245#M790059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using the personal Edition and I got an "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;License is embedded in this document is not valid&lt;/SPAN&gt;" error. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2018 14:52:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14245#M790059</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-29T14:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14246#M790060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you help me with some macro lines? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2018 15:09:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14246#M790060</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-29T15:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14247#M790061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ActiveDocument.Fields("Name of my field").GetSelectedValues.Count only counts whether I have selected any value of the field "Cycle" or not. Which is partially useful in my future nested IFs in macro. But I need to get the value I have selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried using only ActiveDocument.Fields("Name of my field").GetSelectedValues, to get the value that I have selected in the field, but I keep getting an "Unknown Runtime Error".&lt;SPAN style="font-size: 10pt;"&gt;More exactly the line with the error is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;XlDoc.Sheets(1).Range("Q1").Value = cycle_value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I use cycle_value in a Nested IFs? Am I using it wrong?&amp;nbsp; &lt;/P&gt;&lt;P&gt;I'm looking for something like:&lt;BR /&gt;if cycle_value = "Cycle1" then&lt;/P&gt;&lt;P&gt;[Do something]&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;if cycle_value = "Cycle2" then&lt;/P&gt;&lt;P&gt;[Do something else]&lt;/P&gt;&lt;P&gt;end if &lt;/P&gt;&lt;P&gt;if cycle_value = "Cycle 3" then&lt;/P&gt;&lt;P&gt;[Do something different]&lt;/P&gt;&lt;P&gt;end if &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2018 15:51:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14247#M790061</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-29T15:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14248#M790062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that you have to develop a macro with the following structure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0) Create a variable like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vValueSelected = [Cycle Field]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Count the total values in you table column. Use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; totalValues = ActiveDocument.Fields("Cycle").GetSelectedValues.Count&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;2) Obtain all values and save into variable&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set allValues = ActiveDocument.Fields("Cycle").GetSelectedValues&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) A loop from i=0 to totalValues&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) (Inside the loop) Obtain the value of field Cycle of each iteration&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; valueCycleIteration = &lt;SPAN style="font-size: 13.3333px;"&gt;allValues&lt;/SPAN&gt;.Item(i).Text&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If &lt;SPAN style="font-size: 13.3333px;"&gt;valueCycleIteration = 'Value 1' Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Put some code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If &lt;SPAN style="font-size: 13.3333px;"&gt;valueCycleIteration = 'Value 2' Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Put some code]&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2018 17:24:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14248#M790062</guid>
      <dc:creator>danielgarciamej</dc:creator>
      <dc:date>2018-01-29T17:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14249#M790063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mihai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the possible scenario checks code. You can adapt this as per your need. Please let me know if you have any questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Sub Test&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;If ActiveDocument.Fields("Year").GetSelectedValues.Count = 0 Then&lt;BR /&gt; &lt;BR /&gt; Msgbox "Nothing is selected"&lt;BR /&gt; &lt;BR /&gt;Else&lt;BR /&gt; &lt;BR /&gt; if ActiveDocument.Fields("Year").GetSelectedValues.Count &amp;gt;1 Then&lt;BR /&gt; &lt;BR /&gt; Msgbox "Multiple Values Selected"&lt;BR /&gt; &lt;BR /&gt; Else&lt;BR /&gt; &lt;BR /&gt; SET Field = Activedocument.Fields("Year").GetSelectedValues&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp; &lt;STRONG style="color: #0000ff;"&gt;If Field(i).text ="Cycle1" Then&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Do something]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;&amp;nbsp; Else &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Field(i).text ="Cycle2" Then&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Do something else]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'If Field(i).text ="Cycle3" Then&amp;nbsp;&amp;nbsp;&amp;nbsp; ' You can uncomment this line if you want. &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Do something Different]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'End If&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End if&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG style="color: #0000ff;"&gt;&amp;nbsp; End If&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; End If&lt;BR /&gt; &lt;BR /&gt;End If&lt;BR /&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;End&lt;/STRONG&gt; &lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;Sub &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2018 18:20:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14249#M790063</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2018-01-29T18:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14250#M790065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, didn't knew that GetSelectedValues method returns an array. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 07:03:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14250#M790065</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-30T07:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14251#M790068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's how I'm using your scenario: &lt;/P&gt;&lt;P&gt;if cycle_flag(i).text = "Cycle1" then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Start_value = ActiveDocument.GetVariable("Cycle1_start")&lt;/P&gt;&lt;P&gt; End_value = ActiveDocument.GetVariable("Cycle1_stop")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if cycle_flag(i).text = "Cycle2" then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Start_value = ActiveDocument.GetVariable("Cycle2_start")&lt;/P&gt;&lt;P&gt; End_value = ActiveDocument.GetVariable("Cycle2_stop")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if cycle_flag(i).text = "Cycle3" then &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Start_value = ActiveDocument.GetVariable("Cycle3_start")&lt;/P&gt;&lt;P&gt; End_value = ActiveDocument.GetVariable("Cycle3_stop")&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 10pt;"&gt;end if&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; end if &lt;/P&gt;&lt;P&gt; end if &lt;/P&gt;&lt;P&gt;But I get a "Type mismatch: 'cycle_flag'" error &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 07:38:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14251#M790068</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-30T07:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14252#M790069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here you go. Note that your Getvariable syntax is also not correct. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;SET cycle_flag = Activedocument.Fields("&lt;SPAN style="color: #ff0000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Name Of Your Field&lt;/SPAN&gt;").GetSelectedValues&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;if cycle_flag(i).text = "Cycle1" then&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;Start_value = ActiveDocument.GetVariable("Cycle1_start")&lt;SPAN style="color: #0000ff;"&gt;.GetContent.String&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;End_value = ActiveDocument.GetVariable("Cycle1_stop")&lt;STRONG style="color: #0000ff; font-size: 13.3333px;"&gt;.GetContent.String&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;else&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;if cycle_flag(i).text = "Cycle2" then&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;Start_value = ActiveDocument.GetVariable("Cycle2_start")&lt;STRONG style="color: #0000ff; font-size: 13.3333px;"&gt;.GetContent.String&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;End_value = ActiveDocument.GetVariable("Cycle2_stop")&lt;STRONG style="color: #0000ff; font-size: 13.3333px;"&gt;.GetContent.String&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;else&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;if cycle_flag(i).text = "Cycle3" then&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;Start_value = ActiveDocument.GetVariable("Cycle3_start")&lt;STRONG style="color: #0000ff; font-size: 13.3333px;"&gt;.GetContent.String&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;End_value = ActiveDocument.GetVariable("Cycle3_stop")&lt;STRONG style="color: #0000ff; font-size: 13.3333px;"&gt;.GetContent.String&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;end if&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;end if&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;end if&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 07:51:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14252#M790069</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2018-01-30T07:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14253#M790070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now I'm getting an "Invalid procedure call or argument" error...&lt;/P&gt;&lt;P&gt;Here's the whole code: &lt;/P&gt;&lt;P&gt;set cycle_value = ActiveDocument.Fields("Cycle").GetSelectedValues&lt;/P&gt;&lt;P&gt;if cycle_value(i).text = "Cycle1" then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Start_value = ActiveDocument.GetVariable("Cycle1_start")&lt;/P&gt;&lt;P&gt; End_value = ActiveDocument.GetVariable("Cycle1_stop")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if cycle_value(i).text = "Cycle2" then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Start_value = ActiveDocument.GetVariable("Cycle2_start")&lt;/P&gt;&lt;P&gt; End_value = ActiveDocument.GetVariable("Cycle2_stop")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if cycle_value(i).text = "Cycle3" then &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Start_value = ActiveDocument.GetVariable("Cycle3_start")&lt;/P&gt;&lt;P&gt; End_value = ActiveDocument.GetVariable("Cycle3_stop")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; end if&lt;/P&gt;&lt;P&gt; end if &lt;/P&gt;&lt;P&gt; end if &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 07:58:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14253#M790070</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-30T07:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14254#M790071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mihai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already updated the above code. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;set cycle_value = ActiveDocument.Fields("Cycle").GetSelectedValues&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if cycle_value(i).text = "Cycle1" then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Start_value = ActiveDocument.GetVariable("Cycle1_start")&lt;STRONG style="color: #0000ff; font-size: 13.3333px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;.GetContent.String&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;End_value = ActiveDocument.GetVariable("Cycle1_stop")&lt;STRONG style="color: #0000ff; font-size: 13.3333px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;.GetContent.String&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if cycle_value(i).text = "Cycle2" then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Start_value = ActiveDocument.GetVariable("Cycle2_start")&lt;STRONG style="color: #0000ff; font-size: 13.3333px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;.GetContent.String&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;End_value = ActiveDocument.GetVariable("Cycle2_stop")&lt;STRONG style="color: #0000ff; font-size: 13.3333px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;.GetContent.String&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if cycle_value(i).text = "Cycle3" then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Start_value = ActiveDocument.GetVariable("Cycle3_start")&lt;STRONG style="color: #0000ff; font-size: 13.3333px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;.GetContent.String&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;End_value = ActiveDocument.GetVariable("Cycle3_stop")&lt;STRONG style="color: #0000ff; font-size: 13.3333px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;.GetContent.String&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;end if&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;end if&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;end if&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 08:00:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14254#M790071</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2018-01-30T08:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14255#M790072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There seems to be an error at the : if cycle_value(i).text = "Cycle1" then &lt;/P&gt;&lt;P&gt;&lt;IMG alt="error.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/191800_error.PNG" style="height: 267px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 08:06:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14255#M790072</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-30T08:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14256#M790073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you have not selected any values in the Cycle field or you must be selecting multiple values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 08:16:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14256#M790073</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2018-01-30T08:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14257#M790074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have multiple values selected in a multi-box, but only one selected in the Cycle field. Could that be the issue? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 08:19:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14257#M790074</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-30T08:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14258#M790075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;Can you try this script and let me know whether you are getting any error message or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;If ActiveDocument.Fields("&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Cycle&lt;/SPAN&gt;").GetSelectedValues.Count = 0 Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;Msgbox "Nothing is selected"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;Else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;if ActiveDocument.Fields("&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Cycle&lt;/SPAN&gt;").GetSelectedValues.Count &amp;gt;1 Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;Msgbox "Multiple Values Selected"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;Else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;set cycle_value = ActiveDocument.Fields("Cycle").GetSelectedValues&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if cycle_value(i).text = "Cycle1" then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Start_value = ActiveDocument.GetVariable("Cycle1_start")&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #0000ff;"&gt;.GetContent.String&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;End_value = ActiveDocument.GetVariable("Cycle1_stop")&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #0000ff;"&gt;.GetContent.String&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if cycle_value(i).text = "Cycle2" then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Start_value = ActiveDocument.GetVariable("Cycle2_start")&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #0000ff;"&gt;.GetContent.String&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;End_value = ActiveDocument.GetVariable("Cycle2_stop")&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #0000ff;"&gt;.GetContent.String&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if cycle_value(i).text = "Cycle3" then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Start_value = ActiveDocument.GetVariable("Cycle3_start")&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #0000ff;"&gt;.GetContent.String&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;End_value = ActiveDocument.GetVariable("Cycle3_stop")&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #0000ff;"&gt;.GetContent.String&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;end if&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;end if&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;end if&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;End If&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;End If&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 08:28:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14258#M790075</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2018-01-30T08:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14259#M790076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've run your script but I didn't got any message. At all. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 08:39:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14259#M790076</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-30T08:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14260#M790077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've managed to solve the error by simply replacing &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;cycle_value(i).text with cycle_value(0).text. I will mark your first answer as the correct. Thank you for all the help!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 08:55:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14260#M790077</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-30T08:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Use of selected value in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14261#M790078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My bad. Glad that you found the mistake. Have a nice day! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 09:09:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-of-selected-value-in-macro/m-p/14261#M790078</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2018-01-30T09:09:02Z</dc:date>
    </item>
  </channel>
</rss>

