question

Nicolas M6 avatar image
0 Likes"
Nicolas M6 asked Nicolas M6 commented

How to create a query for locations

Hi,

I would like to create a query for a locations group of rooms.

The rooms have a label "Specialite". This label changes each day.

The patient comes with a label "SpecialiteP".

Query that I whant to do:
The patient pulls a room from the group "Salles"
where the "SpecialiteP" = "Specialite"

How can I do that ?

Can you show me in the model attached ? (explanations inside).

Thanks in advance.

@Braydn T

20200124-sallesetfluxpatient-query.fsm

FlexSim 19.2.4
querygroupslocations
5 |100000

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

1 Answer

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Nicolas M6 commented

You just need to add the Specialite clause into the WHERE statement with an AND:

WHERE [Salles] AND value.Specialite = puller.SpecialiteP AND (Priority = 0 OR (Priority < 100 AND Preemptable > 0)) ORDER BY Priority, [Salles]

customwhere.fsm

This is much easier now in 2020, you would just add the clause in the Filter By field:

customwhere2020.fsm


filterby.png (7.7 KiB)
customwhere.fsm (64.7 KiB)
customwhere2020.fsm (67.8 KiB)
· 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.

Nicolas M6 avatar image Nicolas M6 commented ·

thank you very much for your answer. Perfect. It correspond to what I was looking for.

0 Likes 0 ·