<?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: Why is my dynamic expression not working? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/why-is-my-dynamic-expression-not-working/m-p/13530330#M39287</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/30479/diederikbd.html" nodeid="30479"&gt;@Diederik Bd&lt;/A&gt;, was Steven Hamoen's answer helpful? If so, please click the red "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.&lt;/P&gt;&lt;P&gt;If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Sat, 12 Jun 2021 17:03:41 GMT</pubDate>
    <dc:creator>Jeanette_Fullmer</dc:creator>
    <dc:date>2021-06-12T17:03:41Z</dc:date>
    <item>
      <title>Why is my dynamic expression not working?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/why-is-my-dynamic-expression-not-working/m-p/13530328#M39285</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 21.0.6 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi all,&lt;/P&gt;
 &lt;P&gt;In my model, I use a dynamic expression in a global list called: "AantalReadyPlaten".&lt;/P&gt;
 &lt;P&gt;It count the number of rows with fulfill Attribute=Attribute2.&lt;/P&gt;
 &lt;P&gt;The (basic) expression is coded as follows:&lt;/P&gt;
 &lt;P&gt;string WerkStationString=value.WerkStationString;&lt;/P&gt;
 &lt;P&gt;----------------&lt;/P&gt;
 &lt;P&gt;Table result = Table.query("SELECT COUNT() FROM GlobalList WHERE Attribute=Attribute2");&lt;/P&gt;
 &lt;P&gt;if(result.numRows==0){
  &lt;/P&gt;
 &lt;P&gt;returnvalue = 0;&lt;/P&gt;
 &lt;P&gt;} else {
  &lt;/P&gt;
 &lt;P&gt;returnvalue = result[1][1];&lt;/P&gt;
 &lt;P&gt;}&lt;/P&gt;
 &lt;P&gt;//}&lt;/P&gt;
 &lt;P&gt;return returnvalue;&lt;/P&gt;
 &lt;P&gt;-----------------------&lt;/P&gt;
 &lt;P&gt;When having the dynamic button selected and pulling with the query "ORDER BY AantalReadyPlaten DESC", it gives no result. Even with the test pull queries, it gives no result. However the global list is filled with data. It gives the error: "exception: SqlQuery - Unknown error in:"&lt;/P&gt;
 &lt;P&gt;When having the dynamic button deselected the query retrieves data and pulling the row with the highest "returnvalue". So it works fine.&lt;/P&gt;
 &lt;P&gt;Anyone an idea why the dynamic expression is not working?&lt;/P&gt;
 &lt;P&gt;Thanks in advance!&lt;/P&gt;
 &lt;P&gt;Diederik&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 09 Jun 2021 15:37:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/why-is-my-dynamic-expression-not-working/m-p/13530328#M39285</guid>
      <dc:creator>sven_f</dc:creator>
      <dc:date>2021-06-09T15:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my dynamic expression not working?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/why-is-my-dynamic-expression-not-working/m-p/13530329#M39286</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/30479/diederikbd.html" nodeid="30479"&gt;@Diederik Bd&lt;/A&gt; It would be more usefull if you posted a very small model just showing this problem. Just a few thing I see:&lt;BR /&gt;1. You use GlobalList but I assume that in the real query you use the name of the GlobalList?&lt;/P&gt;&lt;P&gt;2. Attribute or Attribute2 are both fields in the GlobalList and also added as fields?&lt;/P&gt;&lt;P&gt;3. I think Count() should have an asterix or a column name, so Count(*)&lt;/P&gt;&lt;P&gt;Hope that one of these remarks helps you?&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 09 Jun 2021 17:35:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/why-is-my-dynamic-expression-not-working/m-p/13530329#M39286</guid>
      <dc:creator>SCHamoen</dc:creator>
      <dc:date>2021-06-09T17:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my dynamic expression not working?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/why-is-my-dynamic-expression-not-working/m-p/13530330#M39287</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/30479/diederikbd.html" nodeid="30479"&gt;@Diederik Bd&lt;/A&gt;, was Steven Hamoen's answer helpful? If so, please click the red "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.&lt;/P&gt;&lt;P&gt;If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 12 Jun 2021 17:03:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/why-is-my-dynamic-expression-not-working/m-p/13530330#M39287</guid>
      <dc:creator>Jeanette_Fullmer</dc:creator>
      <dc:date>2021-06-12T17:03:41Z</dc:date>
    </item>
  </channel>
</rss>

