Idea

Axel Kohonen avatar image
2 Likes"
Axel Kohonen suggested Axel Kohonen commented

Tutorial for debugging list pulls?

Hi,

I am wondering if there is some guide for how to debug pulling from a list? If not then I would appreciate one.

I have sort of figured out how I can debug the pulling from the list, but I would have appreciated it a lot if there would be some guide or tutorial when I started as the list queries seem more tricky to me than table queries and mostly because of the back orders.

When using table queries one generally returns a table with all the results and then you can see if the correct entries are pulled and modify the query accordingly.

The problem that I faced with using the standard pull from list with back orders functionality is that the default code only returns one value and therefore I never quite could figure out what was wrong. Now I know that it is easy to change the amount of values returned by the pull (e.g. set the request and requirenum to zero to get all possible ones, see the listpull documentation).

Also one can also run the model to a certain point in time when the pulls do not work as they should and run the list.pull command from the script window, i.e.

List testlist = List("myList1");
Array result = testlist.pull(queryStr,3, 0, current,0,LIST_DO_NOT_REMOVE);

But it would have been great to have some short tutorial on this so that one would not need to do trial and error, which is rather time consuming.

The tutorial could also contain information on how to see if the back order re-evaluation works correctly.

Anyone else wanting to see a tutorial like this?

Please comment if you have great ideas on how to debug list pulls

Thank you!

Axel

listlist pulllist back orders
5 |100000

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

2 Comments

·
Jordan Johnson avatar image
2 Likes"
Jordan Johnson commented

I think using a Calculated Table would work nicely. You can query a list using something like

SELECT * FROM List1

query from a list. If you need to append a particular partition, you can use something like

SELECT * FROM List1.1

which will pull from partition 1.

The Calculated Table's query field is re-sizable, so you can make it as big as you need for long queries. You can also use hard returns in that field, so your queries can use multiple lines.

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

Axel Kohonen avatar image Axel Kohonen commented ·

Hi @jordan.johnson

Thank you for the tip! Will try this!

Axel

0 Likes 0 ·
Mischa Spelt avatar image
1 Like"
Mischa Spelt commented

Hi Axel,

The easiest way to debug a pull from list is showing the contents of a list as a table, using the View Entries option:

When the window is active, you can enter a query in the Quick Properties. This query will then be applied to the list. If you have dynamic fields that require a puller, you can sample a specific puller from the model to see what the list fields would evaluate to for that puller.

When you are satisfied, you can copy/paste the query back to your Pull activity!

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

Axel Kohonen avatar image Axel Kohonen commented ·

Hi @Mischa Spelt

Thank you for your answer! I am aware of the Test pull queries functionality. However, as my queries are complex and long it is just not very convenient to use the Test Pull Queries functionality. Not even a tenth of my query fits into the field so seeing if e.g. parenthesis are correct is hopeless. It would be great if the field could be multi-line or else able to be expanded so that one could see the whole query at once (Would be great if it could be on the development list @phil.bobo. )

Also, I have found that the Test pull queries might freeze FlexSim sometimes if a wrong query is inserted. FlexSim somehow constantly re-evaluates the queries and if you click outside the window test pull queries with a wrong query FlexSim sometimes seems to end up in an eternal loop of evaluating the query and the only way to stop it is to kill FlexSim. FlexSim is busy calculating the query so pushing the red cross next to the query field is not possible.

So how do you do when the queries are long?

Thank you!

Axel

0 Likes 0 ·

Write a Comment

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

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.