You set the type of the source to interarrival time. In the on creation trigger you increment a label at the source that counts the number of the order to get the right row of your global table. Then you transfer the data from the table row to labels at the item. In an OnExit trigger you read the quantity label, reset the quantity label to 1 and then you create copies of the item in the amount of the quantity in the source. if you want to start the order table from the beginning you set the right starting value of the value to read the table row.
In cases you need the quantity value at the items created at an order point, you put them at a label that you don’t evaluate in the source otherwise you can create an infinite loop of creating items.
The interarrival time value creates the items, set by wether a constant value or a statistical distribution.
If you have the order time point in your table, FlexSim can only evaluate the time of the next order not the current. This means you have to set the order time for the first order discrete in the source code and then after run start for the next order by reading the value of the following order row at the interarrival time function. The current creating item event defines already the arrival time of the next item creation.