Split array as multiple entries when pushing to list

Split array as multiple entries when pushing to list

nilsson_112
Not applicable
117 Views
2 Replies
Message 1 of 3

Split array as multiple entries when pushing to list

nilsson_112
Not applicable

[ FlexSim 23.1.0 ]

Hello!

I have tokens containing arrays with multiple types in them. Is there a way of pushing the different values in the array as individual values to a list?

1713511238427.png

I also want the different types (different part numbers) to only appear once, and the amount of them to be summarized as a total. The first value in the types array is connected to the first value in the PackagesPerPallet array.

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

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

You push onto a list values. This can be references of tokens, items, treenodes and objects. You can push strings, integer or double datatypes as a value. Each value is a key. By reading this key you can get additional attributes as fields in a list. If you push a number like 1 then there is not much you can do with this information to add fields. On the other hand if you push a token onto list and this token has got label values stored, then you add fields of these labels to your list, too.

A push action cannot analyze tuple structures of two or more independent datatypes or arrays and get automatically a relation between them.
If you want to realize a new list by a key value and custom independent fields you can push this as a list parameter onto a list.

If you have an array of key values, then you can push this array. Each array element is a single key value, then. You get then field values, which you can evaluate from the key value.

unique list entries is an option of a list.

accumulating of field values is an option from a dynamic field.

limits of both options are discussed in manual about lists.

0 Likes
Message 3 of 3

Jeanette_Fullmer
Community Manager
Community Manager

Hi @Nilsson, was Joerg Vogel's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes