Access and delete user data

You can access draft and submitted forms data for logged-in and anonymous users in the configured data stores, and if necessary, delete it.

AEM instances

All drafts and submitted forms data in AEM instances (author, publish, or remote) for logged-in and anonymous users are stored in the /content/forms/fp/ node of the applicable AEM repository. Every time a logged-in or anonymous user saves a draft or submits a form, a draft ID or submission ID, a user data ID, and a random ID for each attachment (if applicable) is generated. It is associated with the respective draft or submission.

Access user data

When a logged-in user saves a draft or submits a form, a child node is created with its user ID. For example, drafts and submissions data for Sarah Rose whose user ID is srose are stored in /content/forms/fp/srose/ node in AEM repository. Within the user ID node, the data is organized in a hierarchical structure.

The following table explains how the data for all drafts by srose is stored in AEM repository.

NOTE
An exact structure like drafts is replicated for submitted forms for srose under the /content/forms/fp/srose/submit/ node.
All drafts and submissions by anonymous users are stored under the /content/forms/fp/anonymous/ node, which organizes drafts and submissions for all anonymous users under the draft and submit nodes.
NodeDescription
/content/forms/fp/srose/draftsContainer node data for all drafts by the user
/content/forms/fp/srose/drafts/attachments/Organizes all attachments for the user based on draft ID
/content/forms/fp/srose/drafts/attachments/<ID>Contains an attachment for the selected ID in binary format
/content/forms/fp/srose/drafts/metadata/Organizes form metadata for the user based on draft ID
/content/forms/fp/srose/drafts/metadata/<draft ID>Contains form metadata for the selected draft ID
/content/forms/fp/srose/drafts/data/Organizes forms data for the user based on user data ID
/content/forms/fp/srose/drafts/data/<user data ID>Contains form data for the selected user data ID in binary format

Delete user data

To delete user data from drafts and submissions for a logged-in user from AEM systems completely, you must delete the user ID node for a specific user from the author node. Manually delete data from all applicable AEM instances.

Drafts and submission data for all anonymous users is stored within the common drafts and submit nodes under /content/forms/fp/anonymous. There is no method to find data for a particular anonymous user unless some identifiable information is known. In this case, you can search for information that identifies the anonymous user in the AEM repository and manually delete the node containing it from all applicable AEM instances to remove data from the AEM system. However, to delete data for all anonymous users, you can delete the anonymous node to remove drafts and submissions data for all anonymous users.

Database

When AEM is configured to store data in a database, Forms Portal draft and submission data is stored in the following database tables for both logged-in and anonymous users:

  • data
  • metadata
  • additionalmetadata

Access user data

To access drafts and submissions data for a logged-in and anonymous user in the database tables, run the following database command. In the query, replace logged-in user with the user ID whose data you want to access or with anonymous for anonymous users.

select * from metadata, data, additionalmetadatatable where metadata.owner = 'logged-in user' and metadata.id = additionalmetadatatable.id and metadata.userdataID = data.id

Delete user data

To delete drafts and submissions data for a logged-in user from the database tables, run the following database command. In the query, replace logged-in user with the user ID whose data you want to delete or with anonymous for anonymous users. To delete data for a particular anonymous user from the database, you must find it using some identifiable information and delete it from database tables containing the information.

DELETE FROM metadata, data, additionalmetadatatable USING metadata INNER JOIN data ON metadata.userdataID = data.id INNER JOIN additionalmetadatatable ON metadata.id = additionalmetadatatable.id WHERE metadata.owner = 'logged-in user'

Experience Manager


Espressos & Experience Manager: AEM Forms

Espressos & Experience Manager

Thursday, Mar 6, 7:00 PM UTC

Join Adobe's AEM product team as they highlight AEM Forms' latest innovations, including: the new Gen AI Assistant, Unified Composition with AEM Sites, and new ways to deploy forms through conversations.

Register

Driving Marketing Agility and Scale: Transforming your Content Supply Chain with AI

Online | Strategy Keynote | General Audience

Marketers everywhere are feeling the pressure to deliver impactful campaigns faster and at greater scale. This Strategy Keynote explores...

Tue, Mar 18, 2:30 PM PDT (9:30 PM UTC)

Register

Rapid Feature Releases with AEM Cloud: Telegraph Media Group’s RDE Strategy

Online | Session | Intermediate

Hear how Telegraph Media Group, the award-winning publisher of The Daily Telegraph, The Sunday Telegraph, The Telegraph Magazine,...

Wed, Mar 19, 3:30 PM PDT (10:30 PM UTC)

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more