Count arrays in a table

Count arrays in a table

marian_cretu
Enthusiast Enthusiast
578 Views
3 Replies
Message 1 of 4

Count arrays in a table

marian_cretu
Enthusiast
Enthusiast

[ FlexSim 19.1.2 ]

Hello guys,

I haave a table where I store as an array all pallet details(code,batch,exp_date etc).

I need a querry to count the sku's and sort by quantity.

Here is the model.

The query works if the values are integers but when I switch to arrays it doesnt work anymore.

Please advise.


Tahnk you.count array.fsm

0 Likes
Accepted solutions (1)
579 Views
3 Replies
Replies (3)
Message 2 of 4

philboboADSK
Autodesk
Autodesk
Accepted solution

@Marian Cretu,

What did you expect it to do with these arrays? An Array is an object. Each one of them is unique, even if they may contain values that are the same as a different Array. Did you expect it to concatenate all the values and then compare that, where each set of concatenated values is the same?

Like this?

28132-1588811997835.png

count-array_1.fsm



Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 3 of 4

philboboADSK
Autodesk
Autodesk

If you want to COUNT or GROUP BY a column, then that column's values need to be comparable literal types, not complex objects like Arrays.



Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 4 of 4

marian_cretu
Enthusiast
Enthusiast

Exactly what I want. Thank you.

0 Likes