<?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: How to dynamically copy list entries to a table in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552110#M56516</link>
    <description>&lt;P&gt;Every X seconds I want the content of the list to be copied to a table without erasing what was copied X seconds earlier.  The table keeps getting longer and longer.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Aug 2018 12:56:48 GMT</pubDate>
    <dc:creator>patrickABAWF</dc:creator>
    <dc:date>2018-08-29T12:56:48Z</dc:date>
    <item>
      <title>How to dynamically copy list entries to a table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552103#M56509</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 18.1.2 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;I'm looking to copy the entries on a list to a table every X seconds so that I can later make stats on those entries.&lt;/P&gt;&lt;P&gt;I know how to create a loop in a process flow that reads a custom code every X seconds and I know how to write to a table.&lt;/P&gt;&lt;P&gt;What I'm missing is the command to read the list content.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 16:12:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552103#M56509</guid>
      <dc:creator>patrickABAWF</dc:creator>
      <dc:date>2018-08-28T16:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically copy list entries to a table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552104#M56510</link>
      <description>&lt;P&gt;Hi &lt;A href="https://answers.flexsim.com/users/240/patrick.c.html"&gt;Patrick Cloutier&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;You can write an SQL query to pull/copy the data from the list and dump the queried data into the global  table.&lt;/P&gt;&lt;PRE&gt;Table Result = Table.query("SELECT * FROM ListName");
result.cloneTo(Table("QueryDump"));&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arun KR&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 16:39:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552104#M56510</guid>
      <dc:creator>arunTTT2P</dc:creator>
      <dc:date>2018-08-28T16:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically copy list entries to a table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552105#M56511</link>
      <description>&lt;P&gt;Will this overwrite the data every time I copy or will it append to the table?  I need that second option. &lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 17:17:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552105#M56511</guid>
      <dc:creator>patrickABAWF</dc:creator>
      <dc:date>2018-08-28T17:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically copy list entries to a table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552106#M56512</link>
      <description>&lt;P&gt;My list is called People and my table is called CountCor2 so I wrote: &lt;/P&gt;&lt;P&gt;Table result = Table.query("SELECT * FROM People");&lt;/P&gt;&lt;P&gt;result.cloneTo(Table("CountCor2"));&lt;/P&gt;&lt;P&gt;And I get the error message:&lt;/P&gt;&lt;P&gt;Property "dataType" accessed on invalid node and it erases the content of the table.&lt;/P&gt;&lt;P&gt;What am I doing wrong ?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 19:21:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552106#M56512</guid>
      <dc:creator>patrickABAWF</dc:creator>
      <dc:date>2018-08-28T19:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically copy list entries to a table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552107#M56513</link>
      <description>&lt;P&gt;That error was when my code was in a userevent.  I put the code in the process flow instead and it works. &lt;/P&gt;&lt;P&gt;But as indicated earlier, I need to append to the table and not overwrite it.  How can I do that?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 20:36:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552107#M56513</guid>
      <dc:creator>patrickABAWF</dc:creator>
      <dc:date>2018-08-28T20:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically copy list entries to a table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552108#M56514</link>
      <description>&lt;P&gt;You clone the tables to arrays. Then you append one to the other. And finally you make a table query over the array to get a table again. &lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 01:15:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552108#M56514</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2018-08-29T01:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically copy list entries to a table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552109#M56515</link>
      <description>&lt;P&gt;Hi &lt;A href="https://answers.flexsim.com/users/240/patrick.c.html"&gt;Patrick Cloutier&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;I was thinking how the appending and overwriting makes a difference. Can you explain more on your requirement?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 07:55:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552109#M56515</guid>
      <dc:creator>arunTTT2P</dc:creator>
      <dc:date>2018-08-29T07:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically copy list entries to a table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552110#M56516</link>
      <description>&lt;P&gt;Every X seconds I want the content of the list to be copied to a table without erasing what was copied X seconds earlier.  The table keeps getting longer and longer.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 12:56:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552110#M56516</guid>
      <dc:creator>patrickABAWF</dc:creator>
      <dc:date>2018-08-29T12:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically copy list entries to a table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552111#M56517</link>
      <description>&lt;P&gt;OK I made it work.  I cloneto the list to a table and then I append this table to another table using a for loop that I created.  &lt;/P&gt;&lt;P&gt;It works EXCEPT that some of the columns in my table are in pointer format so I need to convert them to string format.  I tried tostring() but it doesn't work.  &lt;/P&gt;&lt;P&gt;Here is the statement that works:&lt;/P&gt;&lt;P&gt;Table("CountCor2Append")[lastrow+i][1] = Table("CountCor2")&lt;I&gt;[1];&lt;/I&gt;&lt;/P&gt;&lt;P&gt;How do I convert to string at the same time?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 13:48:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552111#M56517</guid>
      <dc:creator>patrickABAWF</dc:creator>
      <dc:date>2018-08-29T13:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically copy list entries to a table</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552112#M56518</link>
      <description>&lt;P&gt;
	Cast the value to a treenode and call getPath():&lt;/P&gt;
&lt;PRE&gt;Table("GlobalTable1")[1][1].as(treenode).getPath()
&lt;/PRE&gt;&lt;P&gt;
	Also, you don't need to use the intermediate table. Just use a for() loop to iterate through the returned query result Table rather than cloning it and then using a for() loop through the clone.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 18:34:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-dynamically-copy-list-entries-to-a-table/m-p/13552112#M56518</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2018-08-29T18:34:42Z</dc:date>
    </item>
  </channel>
</rss>

