<?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: Read field values from a list in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/read-field-values-from-a-list/m-p/13500487#M15836</link>
    <description>&lt;P&gt;And to read the fields?&lt;/P&gt;</description>
    <pubDate>Thu, 23 Mar 2017 14:22:18 GMT</pubDate>
    <dc:creator>marco_baccalaro</dc:creator>
    <dc:date>2017-03-23T14:22:18Z</dc:date>
    <item>
      <title>Read field values from a list</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/read-field-values-from-a-list/m-p/13500485#M15834</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 17.0.3 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;I really need to read the fields values from a List.&lt;/P&gt;&lt;P&gt;I tried to query it but I haven't found a way to do it.&lt;/P&gt;&lt;P&gt;Is there a way to do it?&lt;/P&gt;&lt;PRE&gt;Object list = globallist("MyList");
treenode theList = listentries(list);
query("SELECT value, levels, sku FROM $1",theList);
treenode table = model().find("Tools/prova");
dumpquery(table);&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Mar 2017 13:24:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/read-field-values-from-a-list/m-p/13500485#M15834</guid>
      <dc:creator>marco_baccalaro</dc:creator>
      <dc:date>2017-03-23T13:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Read field values from a list</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/read-field-values-from-a-list/m-p/13500486#M15835</link>
      <description>&lt;P&gt;
	&lt;A rel="user" href="https://answers.flexsim.com/users/391/marco.b.html" nodeid="391"&gt;@Marco Baccalaro&lt;/A&gt;&lt;/P&gt;&lt;P&gt;
	I've found the best way to read the value from the list is to use the listpull() command with 0 as the requested value, and 0 as the required value (this way it doesn't actually pull them from the list.&lt;/P&gt;
&lt;PRE&gt;int myValue = 15;
string myquery = "WHERE value = " + numtostring(myValue);
Array myArray = listpull(globallist("MyList"), myquery, 0, 0);
&lt;/PRE&gt;&lt;P&gt;
Hopefully this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 13:56:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/read-field-values-from-a-list/m-p/13500486#M15835</guid>
      <dc:creator>cameron_pluim</dc:creator>
      <dc:date>2017-03-23T13:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Read field values from a list</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/read-field-values-from-a-list/m-p/13500487#M15836</link>
      <description>&lt;P&gt;And to read the fields?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 14:22:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/read-field-values-from-a-list/m-p/13500487#M15836</guid>
      <dc:creator>marco_baccalaro</dc:creator>
      <dc:date>2017-03-23T14:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Read field values from a list</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/read-field-values-from-a-list/m-p/13500488#M15837</link>
      <description>&lt;P&gt;That is a good question, (and probably your initial question).&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 18:34:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/read-field-values-from-a-list/m-p/13500488#M15837</guid>
      <dc:creator>cameron_pluim</dc:creator>
      <dc:date>2017-03-23T18:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Read field values from a list</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/read-field-values-from-a-list/m-p/13500489#M15838</link>
      <description>&lt;P&gt;Yes, I really don't know how to do it, the query gives me the fields names and the count but not the fields values.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 20:35:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/read-field-values-from-a-list/m-p/13500489#M15838</guid>
      <dc:creator>marco_baccalaro</dc:creator>
      <dc:date>2017-03-23T20:35:13Z</dc:date>
    </item>
  </channel>
</rss>

