Adding a filter to determine if record shoudl be published