<?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 can I evaluate attributes of the content of a queue in a SQL query? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-evaluate-attributes-of-the-content-of-a-queue-in-a-sql/m-p/13563671#M65683</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/461/joerg.v.html" nodeid="461"&gt;@Jörg Vogel&lt;/A&gt;, Can you show me this behavior as a model or screen shot? It seems working for me without any problem.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arun KR&lt;/P&gt;</description>
    <pubDate>Sat, 04 Nov 2017 03:14:07 GMT</pubDate>
    <dc:creator>arunTTT2P</dc:creator>
    <dc:date>2017-11-04T03:14:07Z</dc:date>
    <item>
      <title>How can I evaluate attributes of the content of a queue in a SQL query?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-evaluate-attributes-of-the-content-of-a-queue-in-a-sql/m-p/13563667#M65679</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 17.2.2 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;I am trying to get sum of the physical length of all items in a queue. I think a "SUM" clause will do that, but I can't get even a reference to a single item in the queue. I tried the adjusted approach in Flexsim 16 and it worked. In the current version Flexsim 17.2.2 I get a table which contains "no data" entries. I have tried to cast the queue into different datatypes, which doesn't change anything, I have tried to get a reference by a rank, that doesn't work neither. The Tutorial method does not work from the section "Advanced Query Techniques" under "SQL queries". Passing the Flexscript function in Dot-syntax or classic structure makes no difference. If I execute the code in a script window, doesn't change anything. What is the current syntax to query the items in a queue? &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="9341-query-code-help-not-functions.jpg"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1496248i00A66E68451F8DA7/image-size/large?v=v2&amp;amp;px=999" role="button" title="9341-query-code-help-not-functions.jpg" alt="9341-query-code-help-not-functions.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 13:04:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-evaluate-attributes-of-the-content-of-a-queue-in-a-sql/m-p/13563667#M65679</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2017-11-03T13:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: How can I evaluate attributes of the content of a queue in a SQL query?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-evaluate-attributes-of-the-content-of-a-queue-in-a-sql/m-p/13563668#M65680</link>
      <description>&lt;P&gt;here is the file:&lt;A id="9342" href="https://answers.flexsim.com/storage/temp/9342-query-queue-content-v1722.fsm"&gt;query-queue-content-v1722.fsm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 13:06:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-evaluate-attributes-of-the-content-of-a-queue-in-a-sql/m-p/13563668#M65680</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2017-11-03T13:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can I evaluate attributes of the content of a queue in a SQL query?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-evaluate-attributes-of-the-content-of-a-queue-in-a-sql/m-p/13563669#M65681</link>
      <description>&lt;P&gt;Hi &lt;A href="https://answers.flexsim.com/users/461/joerg.v.html"&gt;Jörg Vogel&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;It's working for me. I used $iter only to get a reference of the flow items inside the Queue. Also, there is a chance that, it can be a bug. Blank tables with red linings were appearing sometimes after performing a sum operation and then performing the code below. Not sure the exact cause. &lt;/P&gt;&lt;PRE&gt;Table result = Table.query("SELECT  $2 AS Item,$3 AS Name,$4 AS Size FROM $1 Queue",model().find("Queue1"),$iter(1),$iter(1).as(Object).name,$iter(1).as(Object).size.x);
result.cloneTo(Table("GlobalTable1"));
&amp;lt;br&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;A id="9343" href="https://answers.flexsim.com/storage/temp/9343-support-joerg.fsm"&gt;support-joerg.fsm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arun KR&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 16:49:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-evaluate-attributes-of-the-content-of-a-queue-in-a-sql/m-p/13563669#M65681</guid>
      <dc:creator>arunTTT2P</dc:creator>
      <dc:date>2017-11-03T16:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: How can I evaluate attributes of the content of a queue in a SQL query?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-evaluate-attributes-of-the-content-of-a-queue-in-a-sql/m-p/13563670#M65682</link>
      <description>&lt;P&gt;Thanks, &lt;A rel="user" href="https://answers.flexsim.com/users/437/arun.k.html" nodeid="437"&gt;@Arun KR&lt;/A&gt;, I get a result of the size, even if the reference to the item contains in the table cell a "no data" entry. I thought, where no data is, there can not be a result at all. That is a mistake. There is data, but not visible. &lt;/P&gt;&lt;PRE&gt;Table resultQueue1 = Table.query("SELECT SUM($2) AS itemsQueueLength FROM $1",&lt;BR /&gt;             /*$1*/model().find("Queue1"),&lt;BR /&gt;             /*$2*/$iter(1).as(Object).size.x);&lt;/PRE&gt;&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/437/arun.k.html" nodeid="437"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 17:53:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-evaluate-attributes-of-the-content-of-a-queue-in-a-sql/m-p/13563670#M65682</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2017-11-03T17:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: How can I evaluate attributes of the content of a queue in a SQL query?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-evaluate-attributes-of-the-content-of-a-queue-in-a-sql/m-p/13563671#M65683</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/461/joerg.v.html" nodeid="461"&gt;@Jörg Vogel&lt;/A&gt;, Can you show me this behavior as a model or screen shot? It seems working for me without any problem.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arun KR&lt;/P&gt;</description>
      <pubDate>Sat, 04 Nov 2017 03:14:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-evaluate-attributes-of-the-content-of-a-queue-in-a-sql/m-p/13563671#M65683</guid>
      <dc:creator>arunTTT2P</dc:creator>
      <dc:date>2017-11-04T03:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can I evaluate attributes of the content of a queue in a SQL query?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-evaluate-attributes-of-the-content-of-a-queue-in-a-sql/m-p/13563672#M65684</link>
      <description>&lt;P&gt;To get the length of all the items in a queue, I used this code:&lt;/P&gt;&lt;PRE&gt;Table.query("SELECT SUM($2) FROM $1", model().find("Queue1"), $iter(1).as(Object).size.x)[1][1]&lt;/PRE&gt;&lt;P&gt;I couldn't replicate the issue on my machine (17.2.2).&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 16:47:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-evaluate-attributes-of-the-content-of-a-queue-in-a-sql/m-p/13563672#M65684</guid>
      <dc:creator>JordanLJohnson</dc:creator>
      <dc:date>2017-11-06T16:47:06Z</dc:date>
    </item>
  </channel>
</rss>

