<?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 Populating Input Table full of Macro with Values from Front End Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Populating-Input-Table-full-of-Macro-with-Values-from-Front-End/m-p/1874059#M1216610</link>
    <description>&lt;P&gt;I'm trying to work out how to populate an Input Table with values from a Table using a macro.&lt;/P&gt;
&lt;P&gt;Below is the table and the input table that I wish to populate&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="lbZNOn.png" style="width: 329px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/69027i4DA374BBA1C13C94/image-size/large?v=v2&amp;amp;px=999" role="button" title="lbZNOn.png" alt="lbZNOn.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have seen code that lets me select the cell based on row/column numbers, but I am trying to work out how to do it via an IF statement, eg:&lt;/P&gt;
&lt;P&gt;Sub Condition-Ext Wall Paint BCK&lt;/P&gt;
&lt;P&gt;set table = ActiveDocument.GetSheetObject( "TB_YearNew" )&lt;BR /&gt;CellRect = ActiveDocument.GetApplication().GetEmptyRect()&lt;BR /&gt;CellRect.Width = table.GetColumnCount&lt;BR /&gt;CellRect.Height = table.GetRowCount&lt;BR /&gt;set CellMatrix = table.GetCells(CellRect)&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF9900"&gt;r = Activedocument.variables("r").Getcontent.String&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF9900"&gt;c = Activedocument.variables("c").Getcontent.String&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF9900"&gt;set cell = CellMatrix.Item(r).Item(c-1)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Activedocument.variables("Mod-Condition-Ext Wall Paint BCK").SetContent cell.text,1&lt;/P&gt;
&lt;P&gt;End Sub&lt;/P&gt;
&lt;P&gt;I need to work out how to replace the orange text with an IF statement that does the following&lt;/P&gt;
&lt;P&gt;IF([Component] = 'Condition-Ext Wall Paint BCK', THEN COPY THE VALUE IN THE CELL TO THE RIGHT)&lt;/P&gt;
&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Dec 2021 05:43:11 GMT</pubDate>
    <dc:creator>lukegilligan_scch</dc:creator>
    <dc:date>2021-12-22T05:43:11Z</dc:date>
    <item>
      <title>Populating Input Table full of Macro with Values from Front End Table</title>
      <link>https://community.qlik.com/t5/QlikView/Populating-Input-Table-full-of-Macro-with-Values-from-Front-End/m-p/1874059#M1216610</link>
      <description>&lt;P&gt;I'm trying to work out how to populate an Input Table with values from a Table using a macro.&lt;/P&gt;
&lt;P&gt;Below is the table and the input table that I wish to populate&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="lbZNOn.png" style="width: 329px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/69027i4DA374BBA1C13C94/image-size/large?v=v2&amp;amp;px=999" role="button" title="lbZNOn.png" alt="lbZNOn.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have seen code that lets me select the cell based on row/column numbers, but I am trying to work out how to do it via an IF statement, eg:&lt;/P&gt;
&lt;P&gt;Sub Condition-Ext Wall Paint BCK&lt;/P&gt;
&lt;P&gt;set table = ActiveDocument.GetSheetObject( "TB_YearNew" )&lt;BR /&gt;CellRect = ActiveDocument.GetApplication().GetEmptyRect()&lt;BR /&gt;CellRect.Width = table.GetColumnCount&lt;BR /&gt;CellRect.Height = table.GetRowCount&lt;BR /&gt;set CellMatrix = table.GetCells(CellRect)&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF9900"&gt;r = Activedocument.variables("r").Getcontent.String&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF9900"&gt;c = Activedocument.variables("c").Getcontent.String&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF9900"&gt;set cell = CellMatrix.Item(r).Item(c-1)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Activedocument.variables("Mod-Condition-Ext Wall Paint BCK").SetContent cell.text,1&lt;/P&gt;
&lt;P&gt;End Sub&lt;/P&gt;
&lt;P&gt;I need to work out how to replace the orange text with an IF statement that does the following&lt;/P&gt;
&lt;P&gt;IF([Component] = 'Condition-Ext Wall Paint BCK', THEN COPY THE VALUE IN THE CELL TO THE RIGHT)&lt;/P&gt;
&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 05:43:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Populating-Input-Table-full-of-Macro-with-Values-from-Front-End/m-p/1874059#M1216610</guid>
      <dc:creator>lukegilligan_scch</dc:creator>
      <dc:date>2021-12-22T05:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Populating Input Table full of Macro with Values from Front End Table</title>
      <link>https://community.qlik.com/t5/QlikView/Populating-Input-Table-full-of-Macro-with-Values-from-Front-End/m-p/1876367#M1216683</link>
      <description>&lt;P&gt;Any suggestions at all?&lt;/P&gt;</description>
      <pubDate>Fri, 31 Dec 2021 23:08:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Populating-Input-Table-full-of-Macro-with-Values-from-Front-End/m-p/1876367#M1216683</guid>
      <dc:creator>lukegilligan_scch</dc:creator>
      <dc:date>2021-12-31T23:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Populating Input Table full of Macro with Values from Front End Table</title>
      <link>https://community.qlik.com/t5/QlikView/Populating-Input-Table-full-of-Macro-with-Values-from-Front-End/m-p/1876688#M1216703</link>
      <description>&lt;P&gt;If you not want to set fixed variable-values else depending ones you will need to pull all needed values into the macro. All relevant values must be on the same level and then you could apply an if-then-else.&lt;/P&gt;
&lt;P&gt;Personally I don't think that this macro-approach is the easiest method. Because of your description it looked that you want to read a table-box which means this data exists already within the datamodel and aren't calculated within the Ui and therefore the variables could be created and set within the script.&lt;/P&gt;
&lt;P&gt;Also thinkable is to use an expression within the input-box to fill the variables directly with the wanted values. An input-box could also provide scroll- and drop-down listings for the variables and they could be also calculated.&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 14:25:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Populating-Input-Table-full-of-Macro-with-Values-from-Front-End/m-p/1876688#M1216703</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-01-03T14:25:43Z</dc:date>
    </item>
  </channel>
</rss>

