Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py	(revision 13215)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py	(revision 13216)
@@ -83,19 +83,15 @@
 
     @property
-    def record_used(self):
+    def container_code(self):
+        try:
+            code = self.__parent__.code
+        except AttributeError:  # in unit tests
+            return
         if (self.password,
             self.firstname,
             self.lastname,
-            self.email) != (None, None, None, None):
-            return True
-        return False
-
-    @property
-    def container_code(self):
-        try:
-            code = self.__parent__.code
-        except AttributeError:  # in unit tests
-            return
-        return code
+            self.email) == (None, None, None, None):
+            return code + '-'
+        return code + '+'
 
     @property
@@ -236,5 +232,5 @@
     email = index.Field(attribute='email')
     state = index.Field(attribute='state')
-    record_used = index.Field(attribute='record_used')
+    container_code = index.Field(attribute='container_code')
 
 class ApplicantFactory(grok.GlobalUtility):
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py	(revision 13215)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py	(revision 13216)
@@ -101,4 +101,6 @@
             # unwanted excel automatic
             value = str('%s#' % value)
+        elif name == 'container_code':
+            value = value.strip('+')
         return super(
             ApplicantExporter, self).mangle_value(
@@ -117,4 +119,5 @@
         """Export all applicants into filepath as CSV data.
         If `filepath` is ``None``, a raw string with CSV data is returned.
+        Only used records are being exported.
         """
         catalog = queryUtility(
@@ -126,11 +129,14 @@
             # We therefore search for applicant_id.
             applicant_id=(None, None))
-        return self.export(applicants, filepath)
+        used = [value for value in applicants if value.container_code.endswith('+')]
+        return self.export(used, filepath=filepath)
 
     def export_filtered(self, site, filepath=None, **kw):
         """Export filtered applicants in container denoted by keywords (`kw`).
         If `filepath` is ``None``, a raw string with CSV data should
-        be returned.
+        be returned. Only used records are being exported.
         """
         container = grok.getSite()['applicants'][kw['container']]
-        return self.export(container.values(), filepath=filepath)
+        container_values = container.values()
+        used = [value for value in container_values if value.container_code.endswith('+')]
+        return self.export(used, filepath=filepath)
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py	(revision 13215)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py	(revision 13216)
@@ -327,9 +327,8 @@
     """
     state = Attribute('Application state of an applicant')
-    record_used = Attribute('True if password or any required field has been set')
     history = Attribute('Object history, a list of messages')
     display_fullname = Attribute('The fullname of an applicant')
     application_number = Attribute('The key under which the record is stored')
-    container_code = Attribute('Code of the parent container')
+    container_code = Attribute('Code of the parent container plus additional information if record is used or not')
     translated_state = Attribute('Real name of the application state')
     special = Attribute('True if special application')
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/root.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/root.py	(revision 13215)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/root.py	(revision 13216)
@@ -94,10 +94,10 @@
             try:
                 cat = getUtility(ICatalog, name='applicants_catalog')
-                if 'record_used' not in cat.keys():
+                if 'container_code' not in cat.keys():
                     nothing_to_do = False
-                    cat[u'record_used'] = FieldIndex(field_name=u'record_used')
+                    cat[u'container_code'] = FieldIndex(field_name=u'container_code')
                     cat.updateIndexes()
                     logger.info(
-                        '%s: record_used index added to applicants_catalog.'
+                        '%s: container_code index added to applicants_catalog.'
                         % self.log_prefix)
             except ComponentLookupError: # in unit tests
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicant.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicant.py	(revision 13215)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicant.py	(revision 13216)
@@ -191,12 +191,17 @@
         return
 
-    def test_record_used(self):
-        self.applicant.password is None
-        self.applicant.firstname is None
-        self.applicant.lastname is None
-        self.applicant.email is None
-        self.applicant.record_used is False
-        self.applicant.firstname is 'Anna'
-        self.applicant.record_used is True
+    def test_container_code(self):
+        fake_container = grok.Container()
+        fake_container.__name__ = 'folder'
+        fake_container.code = 'folder'
+        appl = Applicant()
+        appl.password is None
+        appl.firstname is None
+        appl.lastname is None
+        appl.email is None
+        appl.container_code is 'folder-'
+        appl.firstname is 'Anna'
+        appl.container_code is 'folder+'
+        return
 
 class ApplicantFactoryTest(FunctionalTestCase):
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py	(revision 13215)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py	(revision 13216)
@@ -88,11 +88,15 @@
         cat = getUtility(ICatalog, name='applicants_catalog')
         code = container.code
-        year = int(code[-4:])
-        target = code[:-4]
-        mxcode = target + str(year + 1)
         for state in state_stats:
-            state_stats[state] = len(cat.searchResults(
-                state=(state, state),
-                applicant_id=(code, mxcode)))
+            if state == 'initialized':
+                results = cat.searchResults(
+                                state=(state, state),
+                                container_code=(code + '+', code + '+'))
+                state_stats[state] = len(results)
+            else:
+                results = cat.searchResults(
+                    state=(state, state),
+                    container_code=(code + '+', code + '-'))
+                state_stats[state] = len(results)
         return state_stats, None
 
