question

Raul Vazquez avatar image
0 Likes"
Raul Vazquez asked Joerg Vogel edited

Read field values from a list to evaluate number of loading

Hi team,

Could you help me to know how I can read the field of "ContentQty" please?

I want to know how many bags I need , for instance :

I have the below bags:

A-7 bags with 4000 units each

B-1 bag with 183 units

C-1 bag with 352 units

D-1 bag with 345 units,

My labor (resource) can handled 2000 units, so I need to take the bag B, C, D , so, I need 3 bags...

how could i read the table in order to calculate that by my own? Im thinking in a "for cycle" but I dont know how to read the field list,

Thx a lot

FlexSim 19.1.1
list entriesread list
list1.jpg (47.9 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joseph Gillespie avatar image
1 Like"
Joseph Gillespie answered Raul Vazquez commented

@Raul Vazquez

Let's say you want to get the number of units in your "B" bag. You can read from the table like this:

Table("Input_puck_1 - Kanban_Material Entries")[8][2];

The brackets that the 8 is in represents the row (row 8) and the brackets with the 2 represent the column (column 2).

· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Raul Vazquez avatar image Raul Vazquez commented ·

Thanks, I already notice that I explain wrong,

I mean, how could I read the field value from a "List" in process flow, the list name is "Input_puck_1"

thanks

R.V

capture.jpg

0 Likes 0 ·
capture.jpg (22.9 KiB)
Joseph Gillespie avatar image Joseph Gillespie Raul Vazquez commented ·

@Raul Vazquez

Could you explain some more what you are doing in your model or maybe attach your model? I could probably give you a better answer if I understood what you are doing.

Some options include:

1. Pull an item off the list and reference its ContentQty with token.pulled.ContentQty.

2. If you just want to pull lists that have ContentQty of less than 2000, you could just use a query:

Or you could pull the items with the lowest ContentQty:

After pulling items off the list you could then subtract: (2000 - token.pulled.ContentQty) to find out how many more units you can handle.

1 Like 1 ·
capture.png (2.7 KiB)
capture2.png (2.7 KiB)
Raul Vazquez avatar image Raul Vazquez commented ·

Thanks for the support

0 Likes 0 ·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Joerg Vogel edited

You can query a global list as a table. The Table.query result is a table of the fields you put into the query string of the SELECT clause. If you query your global list by the table query result cells, you can pull the value matching with the result table you have queried. It isn’t clever, but you can get the data of the list entries and not just the value of the list entry.

You find this in the manual in the example section of SQL Queries under the headline Table Selection in the blue box.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.