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 BenjaminCrismanView original
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))
@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?
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
I tried inputting the function suggested and get the attached error.
Could you please check?