How to Filter SOOrder.CustomerID for Specific ID's starting with 'N' and 'A'

  • 25 January 2023
  • 4 replies


I need help to filter the customer ID for this report field to specifically only return Sales Order details for all ID’s starting with ‘N’ and ‘A’. Eg. N ALLE, A ME73

Report is a standard Sales Order Details by Inventory Item used in MYOB Advanced. Screen shot attached.

The field is =[SOOrder.CustomerID], so it needs to return results just for =[SOOrder.CustomerID] = ‘N’ and =[SOOrder.CustomerID] = ‘A’.

Could you please advise the correct logical script to use.

Thanks in advance!




Best answer by BenjaminCrisman 25 January 2023, 15:31

View original

4 replies

Userlevel 7
Badge +8

You can use a simple IIf combined with Left(YourField, 1)=‘N’ or Left(YourField, 1)=‘A’


=IIf(Left(YourField, 1)=‘A’, True, IIf(Left(YourField, 1)=‘N’, True, False))

Userlevel 7
Badge +4

Hi @pallanson! As @aaghaei mentioned you can create a filter on the report which will limit the customers which can populate in the report, but you will need to change this filter each time you want to run for a different customer name, or letter, so it might not be as convenient.

In the report the section where the Customer data populates is in the Detail section (renamed groupDetails):

So this means that you can filter the data in the report printing screen instead:

Have you already tried this?

HI aaghaei,

I tried inputting the function suggested and get the attached error.

Could you please check?


Userlevel 7
Badge +8

I wouldn’t expect you just copy and paste without fixing the pieces for example “YourField”

also you should be using in your schema filter not sure where you inserting it


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2023  Acumatica, Inc. All rights reserved