Adding querying by RecordState