question

Thomas JR avatar image
0 Likes"
Thomas JR asked Ben Wilson commented

List fields and list queries

I have a "Pull from list" - activity with the query

WHERE Booking_ID = puller.Booking_ID

The global list from which I pull the ressources is named "Exam rooms".

I have assigned the label "Booking_ID" to each exam room 3D object, and all exam rooms have been added to the "Exam rooms" list.

However, in the "Fields" - tab of the list properties I have not added a field named "Booking_ID" but my model still works as intended.

I was just wondering whether or not this is to be expected?

I thought FlexSim went through the fields defined in the "Fields" - tab of the list, but it seems to be smart enough to search for the field "Booking_ID" on the objects contained within the "Exam rooms" list themselves.

FlexSim 20.1.3
flexsim 20.1.3listsql queries
· 1
5 |100000

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

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @Thomas JR, was Matthew Gillespie's answer helpful? If so, please click the red "Accept" button on 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

·
Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered

Booking_ID is first assumed to be a field on the list, but if there isn't a field with that name then it is assumed to be a label. From the documentation:


Accessing Labels

If a field that you define in your SQL query is not a defined field on the List, then the query will retrieve the label value of the same name on the entry's value object.

WHERE SKU = "05692AQD"

In this example, if SKU has not been defined as a field on the List, and let's say it is an Item List, the query will retrieve the label named "SKU" on the items that have been added to the List, and compare it against "05692AQD".

https://docs.flexsim.com/en/20.2/Reference/Tools/GlobalLists/FunctionalReference/#QuerySyntax

5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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