<?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 field lookup from variable in macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/field-lookup-from-variable-in-macro/m-p/149770#M27896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;How can I get the value out of my data in a macro?&lt;/P&gt;&lt;P&gt;currently my code looks like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;set var = ActiveDocument.GetSheetObject(objID)&lt;BR /&gt;prop = var.GetProperties&lt;BR /&gt;prop.Layout.Text.v = &amp;lt;I need Target here&amp;gt;&lt;BR /&gt;var.SetProperties prop&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I have a table that have a table that looks like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Level1 Target&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;L1Text 34.3&lt;/P&gt;&lt;P&gt;L1Text2 22.1&lt;/P&gt;&lt;P&gt;The objID will for example be L1Text and I want to change&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;prop.Layout.Text.v = &amp;lt;I need Target here&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;prop.Layout.Text.v = (if objID = &lt;STRONG&gt;Level1&lt;/STRONG&gt;(in the table), display &lt;STRONG&gt;Target&lt;/STRONG&gt;)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thank you!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jul 2009 18:52:32 GMT</pubDate>
    <dc:creator>alerse</dc:creator>
    <dc:date>2009-07-20T18:52:32Z</dc:date>
    <item>
      <title>field lookup from variable in macro</title>
      <link>https://community.qlik.com/t5/QlikView/field-lookup-from-variable-in-macro/m-p/149770#M27896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;How can I get the value out of my data in a macro?&lt;/P&gt;&lt;P&gt;currently my code looks like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;set var = ActiveDocument.GetSheetObject(objID)&lt;BR /&gt;prop = var.GetProperties&lt;BR /&gt;prop.Layout.Text.v = &amp;lt;I need Target here&amp;gt;&lt;BR /&gt;var.SetProperties prop&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I have a table that have a table that looks like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Level1 Target&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;L1Text 34.3&lt;/P&gt;&lt;P&gt;L1Text2 22.1&lt;/P&gt;&lt;P&gt;The objID will for example be L1Text and I want to change&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;prop.Layout.Text.v = &amp;lt;I need Target here&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;prop.Layout.Text.v = (if objID = &lt;STRONG&gt;Level1&lt;/STRONG&gt;(in the table), display &lt;STRONG&gt;Target&lt;/STRONG&gt;)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thank you!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 18:52:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/field-lookup-from-variable-in-macro/m-p/149770#M27896</guid>
      <dc:creator>alerse</dc:creator>
      <dc:date>2009-07-20T18:52:32Z</dc:date>
    </item>
    <item>
      <title>field lookup from variable in macro</title>
      <link>https://community.qlik.com/t5/QlikView/field-lookup-from-variable-in-macro/m-p/149771#M27897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's usually easiest to do this (without a macro) in the chart with an expression like:&lt;/P&gt;&lt;P&gt;fieldvalue('Target',fieldindex('Level1', 'L1Text'))&lt;/P&gt;&lt;P&gt;A warning -- fieldindex() was not working on the QV Server on some release. So test on the server.&lt;/P&gt;&lt;P&gt;If you have futher questions, can you upload an example qvw so I can be sure I understand?&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2009 04:11:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/field-lookup-from-variable-in-macro/m-p/149771#M27897</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-07-21T04:11:28Z</dc:date>
    </item>
  </channel>
</rss>

