In E9, I successfully used a routine demo’ed by @josecgomez (a while ago) that instantiated the dQuery and then looped the AddQueryValueSetItemsRow() method in order to get multiple entries (Order Numbers) from the user before executing the query - which returned a DataSet containing all the selected Orders.
The BAQ used the criteria: OrderHed.OrderNum IN specified Constant list.
This worked great, but I can’t get it to work under E10. It looks like the prevailing thinking (now) is to use Parameters via the AddExecutionParameterRow() method instead?
Problem is, I can’t figure out how to include multiple parameters - The BAQ criteria doesn’t allow “IN” with a Parameter list - only “=” or “Begin”, as in another great demo video (thanks Jose.)
My users are able to select multiple Sales Orders from a grid. I have no problem accessing that list and creating the necessary loop to add the selected order numbers. Does anyone have some guidance on turning that list into the appropriately formatted QueryExecutionDataSet or QueryValueSetItems DataSet?
You can use IN with a List parameter in 10… then (this is kinda contradictory) but you add the same aparameter for each instance of the “IN” when you execute the DynamcQuery in code.
Thanks Jose. I see I can use “IN” with a “Constant List”. But the option for Parameter list is not available.
Are you suggesting I use the constant list and then loop the adds to build a ?!? what exactly?
The list IS there (now I remember), but I can’t create a parameter to then reference in code. ExecutionParameter.AddExecutionParameterRow("listOrders",...
That “listOrder” is the parameter name (in the BAQ) that I can create for a single parameter. But when I select the “list parameter”, do I create a “Parameter List” somewhere? Is this what you’re looking for @hkeric.wci?
That “inList” is where I’m having some difficulty. I can’t create that parameter name! I’m sure I’m doing something stupid, but the parameter exists - it just isn’t visible to be selected…