(SOLVED) - What am I missing? (syntax problem?)

@russian-dima Ok, the code above works in another test dataset. It returns to console the correct number of items in the dataset. But in my main dataset, it returns null . All permissions are set to anyone.