question

Saiprasad A avatar image
0 Likes"
Saiprasad A asked Jason Lightfoot commented

Get labels from pushed entries in List

Hi,

In my model, i push flowitem(crate) to a list during multiple instances. Between those instances, the labels of the flowitem change.

This change is recorded in the list items as I am allowing duplicate entries with different labels.

Now, I would like to pull an entry from the list and along with it, get the labels stored in the list for that list entry of the item.

The problem that I am currently facing is when I pull from the list and refer its labels, the values of the labels are the latest labels on the pushed flowitem in the model.

I am unable to upload my model due to some constraints but let me know if you need further clarification on my question.

Could you please guide me in doing this?

FlexSim 19.1.2
list pull from list
· 5
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

@Saiprasad A, it is a good practice to upload an example model, if a working model can’t be published. You can strip and falsify data on a working model to a state, where you are allowed to share it.

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·
Have you listed the labels in the list as fields and unchecked dynamic values?

Are you pulling the oldest entry since you said you have duplicates? You can order by the push time ascending to pull the earliest.

0 Likes 0 ·
Saiprasad A avatar image Saiprasad A Jason Lightfoot ♦♦ commented ·
Yes @Jason Lightfoot I have unchecked dynamic values so that I have unique instances when the flow item is pushed to the list with its values at different entities.

Actually, I am looking to pull a specific instance instead of the oldest or earliest instance based on the labels saved for that instance

0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Saiprasad A, 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 unaccept and comment back to reopen your question.

0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Saiprasad A, 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 unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Jason Lightfoot commented

Once you pull an item reference of a list, you get naturally only this reference and so it represents its current state in a model. BUT you can instead SELECT values of list fields which you can pull from a list. By your pull you know which item you wanted to get this data from and you can compare it with the state in your model.

· 4
5 |100000

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

Saiprasad A avatar image Saiprasad A commented ·

@Joerg Vogel Please correct me if I am wrong.
Are you saying that I should use a statement like this in the pull from list query:
SELECT labelName WHERE label1 == Puller.label1

If yes, is it possible to get the entire row like following
SELECT * WHERE label1 == Puller.label1?

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Saiprasad A commented ·

query_item_label_values_of_list.fsm

Pull with select reduces a value only by item quantity. More SELECT values don't work in a pull activity.

0 Likes 0 ·
Saiprasad A avatar image Saiprasad A Joerg Vogel commented ·
Thank you @Joerg Vogel, the attached model helped me solve my problem.
0 Likes 0 ·
Show more comments