Order Find For Multiple States

I’m trying to create a Saved Find on the Sales Order screen that will pull orders for retailers based on a region. Everything is working great except that I cannot select multiple states as an option in order to create a region.

I went to the FormListFind entity and manually modified the stateProvinceGeoId to have multiple values (USA_FL,USA_VA,USA_NC,USA_SC,USA_TN,USA_AR,USA_MS,USA_GA) and set the field operator as “in”.

When I run the saved find on the Sales Order screen, it is only displaying results for the first state in the list. How can I get this to recognize all of the states that I have included?

1 Like

Do you have a link to the screen you’re talking about?

Sure… here is a link to the Orders screen (https://erp.rcherbals.com/vapps/PopcAdmin/Order/FindOrder). In the Saved Finds drop down you will see “Retail Orders By State(s) and Date(s)”. That is the one I am working on.

Here is a link to the FormListFind entity for that saved find: https://erp.rcherbals.com/vapps/tools/AutoScreen/AutoEdit/AutoEditMaster?formListFindId=103111&aen=moqui.screen.form.FormListFind

1 Like

Okay what is it that you want to do? Do you want to be able to sort a list by the states enumerated above?

If so, on: https://erp.rcherbals.com/qapps/tools/AutoScreen/AutoEdit/AutoEditMaster?fieldName=stateProvinceGeoId&formListFindId=103111&aen=moqui.screen.form.FormListFindField

You can change the Field Value from

What I want to do is to be able to see all of the orders for all of those states.

Here’s the business reason, we have a sales rep that has a sales territory covering several states. We pay this person a percentage of the sales in their territory. Instead of pulling the sales orders by each state and then manually adding them together I would like to pull a report of the sales in all of those states. Make sense?

1 Like

In SimpleScreens commit a8ac179 I added the allow-multiple=true option to the stateProvinceGeoId field and it is working just fine with the way the query is already setup, so this turned out to be an easy change.

While it’s not always the case, this is one of those where the code change takes less time than the discussion… if it also turns out that I read your use case correctly and this is a solution to it.


Thanks David! That will solve my issue!

1 Like