Using a dataport, I am trying to export only items that are members of a specific Item Categories, Product Groups
or Product Lines. Each of these are a separate field in our Item table.
To exclude those that I do not want I have written the following.
Item - OnBeforeExportRecord()
IF NOT
(
("Item Category Code"='1730') OR
("Item Category Code"='2110') OR
("Product Group Code"='241210') OR
("Product Group Code"='241212') OR
("Product Line Code"='28163201') OR
("Product Line Code"='28221002') OR
("Product Line Code"='28225002')
)
THEN CurrDataport.SKIP;
This works, but it's very slow. My actual list of categories and groups is much longer.
Do you have suggestions on a better way to get this done?
Thanks!
Comments
If you're only exporting a minority of the total records, you can avoid having to scan through the whole table by looking through each segment individually and combining them into a temp table:
Depending on the number of items and groups, and categories, this could be a lot faster.
- Reinhard