<?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 browse through a global table ? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-browse-through-a-global-table/m-p/13513686#M26153</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Thank you, that's amazing ! I'm going to try that asap ! &lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Thu, 29 Apr 2021 14:53:37 GMT</pubDate>
    <dc:creator>leah_r</dc:creator>
    <dc:date>2021-04-29T14:53:37Z</dc:date>
    <item>
      <title>How to browse through a global table ?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-browse-through-a-global-table/m-p/13513684#M26151</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 21.1.1 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi everyone,&lt;/P&gt;
 &lt;P&gt;I want to import my &lt;STRONG&gt;Arrivals Source&lt;/STRONG&gt; from Excel into my Flexsim model. &lt;/P&gt;
 &lt;P&gt;One constraint is that each patient uses specific staff resources. Thus, I need to transform the string “Surgeon1” from my Excel file to the pointer “/Surgeon1” in my Flexsim source. &lt;/P&gt;
 &lt;P&gt;I have thus decided to proceed as follow:&lt;/P&gt;
 &lt;OL&gt;&lt;LI&gt;Import the Excel file in a Global Table G1&lt;/LI&gt;&lt;LI&gt;Build a table G2 where the string values related to staff are transformed into pointers thank to Model.find() and the rest is just copied and pasted.&lt;/LI&gt;&lt;/OL&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="38918-1619701136871.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1505779iCC5ECB2FEDBBB4D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="38918-1619701136871.png" alt="38918-1619701136871.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;For now, my code looks like that : &lt;/P&gt;
 &lt;PRE&gt;/**Custom Code*/

Object current = param(1); 
Object patient = current;
treenode activity = param(2);
Token token = param(3);
treenode processFlow = ownerobject(activity);

Table G1 = Table("ImportExcel");
Table G2 = Table("SourceFlexsim");

int nb_rows_max = G1.numRows; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
int nb_columns_max = G1.numCols; &amp;nbsp; &amp;nbsp;


int index_col_G1 =1;
int index_row_G1 =1;


for (int index_col_G1 =1; index_col_G1 &amp;lt;= nb_columns_max; index_col_G1+=1);
{ &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; for (int index_row_G1; index_row_G1 &amp;lt;=nb_rows_max; index_row_G1+=1);
&amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; G2[index_row_G1][index_col_G1] = G1[index_row_G1][index_col_G1];
&amp;nbsp; &amp;nbsp; }
};&lt;/PRE&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;However, only the first cell G1[1][1] is being copied in G2. Could you help me find a solution? &lt;/P&gt;
 &lt;P&gt;Also, will the model.find() method work in your opinion ?&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;Thanks in advance, &lt;/P&gt;
 &lt;P&gt;Leah&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 29 Apr 2021 13:03:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-browse-through-a-global-table/m-p/13513684#M26151</guid>
      <dc:creator>leah_r</dc:creator>
      <dc:date>2021-04-29T13:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to browse through a global table ?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-browse-through-a-global-table/m-p/13513685#M26152</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi Leah,&lt;/P&gt;&lt;P&gt;One easier way would be to get rid of surgeon names, and just use a number to identify which surgeon you want to pick.&lt;/P&gt;&lt;P&gt;In the attached example &lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/38934-2020-04-29-surgeonid.fsm" target="_blank"&gt;2020-04-29 SurgeonID.fsm&lt;/A&gt;, there is a group of 2 surgeons:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="38900-1619702604933.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1505775i95119B972A241496/image-size/large?v=v2&amp;amp;px=999" role="button" title="38900-1619702604933.png" alt="38900-1619702604933.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In the schedule, I have added a numeric label named &lt;EM&gt;SurgeonID&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;Here the first patient will meet with surgeon #2 and the second patient with surgeon #1:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="38932-1619702635792.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1505776i16B340297ABFC9EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="38932-1619702635792.png" alt="38932-1619702635792.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;To acquire the correct staff I use this statement:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="38933-1619702790904.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1505777i280D58F9B10BB706/image-size/large?v=v2&amp;amp;px=999" role="button" title="38933-1619702790904.png" alt="38933-1619702790904.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This means I look in the group of surgeons at the rank of the surgeon ID. Note that &lt;EM&gt;SurgeonID&lt;/EM&gt; #1 will match &lt;EM&gt;Surgeon1&lt;/EM&gt; if surgeons in the group are in the correct order.&lt;/P&gt;&lt;P&gt;With this method, the arrival schedule don't use pointer labels and I think that it will be easier to import the same table from Excel.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 29 Apr 2021 13:34:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-browse-through-a-global-table/m-p/13513685#M26152</guid>
      <dc:creator>clair_augsburgerZGWRZ</dc:creator>
      <dc:date>2021-04-29T13:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to browse through a global table ?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-browse-through-a-global-table/m-p/13513686#M26153</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Thank you, that's amazing ! I'm going to try that asap ! &lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 29 Apr 2021 14:53:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-browse-through-a-global-table/m-p/13513686#M26153</guid>
      <dc:creator>leah_r</dc:creator>
      <dc:date>2021-04-29T14:53:37Z</dc:date>
    </item>
  </channel>
</rss>

