question

Marco Baccalaro avatar image
1 Like"
Marco Baccalaro asked Marco Baccalaro commented

Read field values from a list

I really need to read the fields values from a List.

I tried to query it but I haven't found a way to do it.

Is there a way to do it?

Object list = globallist("MyList");
treenode theList = listentries(list);
query("SELECT value, levels, sku FROM $1",theList);
treenode table = model().find("Tools/prova");
dumpquery(table);
FlexSim 17.0.3
listlist fields
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

·
Cameron Pluim avatar image
0 Likes"
Cameron Pluim answered Joerg Vogel commented

@Marco Baccalaro

I've found the best way to read the value from the list is to use the listpull() command with 0 as the requested value, and 0 as the required value (this way it doesn't actually pull them from the list.

int myValue = 15;
string myquery = "WHERE value = " + numtostring(myValue);
Array myArray = listpull(globallist("MyList"), myquery, 0, 0);

Hopefully this helps!

· 3
5 |100000

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

Marco Baccalaro avatar image Marco Baccalaro commented ·

And to read the fields?

0 Likes 0 ·
Cameron Pluim avatar image Cameron Pluim Marco Baccalaro commented ·

That is a good question, (and probably your initial question).

0 Likes 0 ·
Marco Baccalaro avatar image Marco Baccalaro Cameron Pluim commented ·

Yes, I really don't know how to do it, the query gives me the fields names and the count but not the fields values.

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.