question

Craig DIckson avatar image
0 Likes"
Craig DIckson asked Sam Stubbs commented

Using query() on a list in Process Flow

I am not having any success getting the query() command to work in process flow. Can someone tell me if I am doing something wrong in the attached model?

The reason I want to use query() vs just having a Pull From List activity pulling 0 tokens is that what I really need is a query with a join, which IIUC I can't do on a Pull From List (since the "FROM " is implied).querying-a-list.fsm

Thanks, Craig

FlexSim 16.2.0
listquery
querying-a-list.fsm (19.0 KiB)
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

·
Jordan Johnson avatar image
1 Like"
Jordan Johnson answered Sam Stubbs commented

Thanks for sending in your model. This model shows a bug in the query command. As far as I can tell, the bug means that you can't currently use the $ syntax if you are querying a list. That bug is going on the dev list right away.

The query command does work, however, if you make a query that has the right values, rather than using the $ syntax. You can make the query itself a variable. In the attached model (which is a modified version of the one you sent), I used a decide to set a query label on the token. Then I use that label value at the query for the query command. You could also construct the query you need (using the concat() and numtostring() commands).

querying-a-list-modified.fsm


· 2
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 ·

@jordan.johnson (off topic) could you perhaps discuss at Flexsim to add a topic named " known bug" to identify bugs discovered in answerhub forum to find them easier, if someone find a similar behaviour again? As I suggested here.

0 Likes 0 ·
Craig DIckson avatar image Craig DIckson commented ·

@jordan.johnson I was able to get your small model to run, no problem. But I still get an error when I apply the same in my much larger model. I'll send you the whole model in a private question to see if you can help me figure out what I am doing differently.

0 Likes 0 ·

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.