Hi all,

i need to use the count variable in crossCompany when i write it shoes error

container desiredCompanies = [‘CEU’, ‘KAR’,‘SS’];

Table cpy;

while select crossCompany count(fieldname): desiredCompanies cpy



How should i write?

If you get an error, please always tell us what the error said and on which line it occurred.

Fortunately your two bugs are obvious to me, so I can answer it even with such an insufficient description.

This is the right syntax:

while select crossCompany: desiredCompanies count(fieldname) from cpy

As usually, you would find the answer in AX documentation:Select Statement Syntax. Please get used to consulting documentation, if you want to learn something.