Form Auto-Mapping: Pull & Push Data Synchronization

Form Auto-Mapping: Pull & Push Data Synchronization Guide

Overview

The Form Auto-Mapping feature allows administrators to synchronize data between forms that share matching machine codes. This guide explains how to properly use the Pull and Push functionality.


⚠️ IMPORTANT: Prerequisites

Before using Pull or Push functionality, you MUST:

  1. Create entries in the receiving form(s) first
    • Entries must exist for each entity you want to sync data into
    • Use the normal form submission process to create these entries
    • Entries with entry_id = 0 are in the default state and may not display properly

  2. Ensure forms have matching machine codes
    • Fields that should sync must have identical machine codes
    • Machine codes are set in the Form Builder > Element Properties

  3. Enable Auto-Mapping on relevant forms
    • Form Settings > Enable Auto-Mapping checkbox


How to Use Pull Data

Pull Data imports matching field values FROM other forms INTO the current form.

Steps:

  1. Open the Form Builder for the form you want to pull data INTO

  2. Make changes to your form structure (if needed)

  3. Click the "Save Form" button

  4. In the sync dialog, select "Pull Form Data In"

  5. Choose whether to:
    • Keep Data - Preserves existing data, only fills empty fields
    • Delete Old Data - Removes all existing data before pulling

  6. Click the appropriate button

⚠️ WARNING:
Pull will overwrite entry data for ALL entities that:

  • Have matching machine codes in other forms

  • Share the same entity_id/company_id

  • Have existing entries (entry_id > 0)


How to Use Push Data

Push Data exports matching field values FROM the current form INTO other forms.

Steps:

  1. Open the Form Builder for the form you want to push data FROM

  2. Make changes to your form structure (if needed)

  3. Click the "Save Form" button

  4. In the sync dialog, select "Push Form Data Out"

  5. Choose whether to:
    • Keep Data - Preserves existing data in receiving forms
    • Delete Old Data - Removes data before pushing

  6. Click the appropriate button

⚠️ WARNING:
Push will overwrite entry data in ALL other forms that:
• Have matching machine codes
• Share the same entity_id/company_id
• Have existing entries (entry_id > 0)


Do Not Sync Option

Select "Do Not Sync" if you only want to save form structure changes without triggering any data synchronization.


Best Practices

  1. Test in a non-production environment first
    • Data overwrites cannot be easily undone
    • Verify machine codes are correct before syncing

  2. Create entries before syncing
    • Use the form submission process to create initial entries
    • Ensure all entities have at least one entry in each form

  3. Review affected entities
    • Pull/Push affects ALL entities with auto-mapping enabled
    • If you only want to sync specific entities, disable auto-mapping temporarily on others

  4. Use consistent machine codes
    • Document your machine code naming conventions
    • Use descriptive names (e.g., "company_name", "contact_email")

  5. Backup data before large syncs
    • Database backups allow recovery if something goes wrong


Common Issues & Solutions

📌 Issue: Data not appearing after Pull/Push

Solution:

  • Verify entries exist in both source and destination forms

  • Check that machine codes match exactly (case-sensitive)

  • Ensure forms are not in "audit mode"

  • Confirm auto-mapping is enabled on all relevant forms

📌 Issue: Wrong data being overwritten

Solution:

  • Review machine code assignments

  • Multiple fields with the same machine code will sync to each other

  • This is by design, but may be unintended

📌 Issue: Some entities are not syncing

Solution: [THIS IS A CONTINUUM GRC EMPLOYEE SETTING ONLY.]

  • Check the entity_form_relation table for entity assignments

  • Entities must be assigned to forms (entity_id in the relation table)

  • Forms with entity_id = 0 sync to all entities


Technical Details

What happens during Pull:

  1. The system identifies all forms assigned to the same entities

  2. Finds fields with matching machine codes

  3. Copies data values from source forms to the destination form

  4. Updates element_status_indicator for changed fields

  5. Syncs cascade (child) forms automatically

What happens during Push:

  1. The system identifies all forms assigned to the same entities

  2. Finds fields with matching machine codes in other forms

  3. Copies data values from the current form to other forms

  4. Updates element_status_indicator in receiving forms

  5. Syncs cascade (child) forms automatically

Machine Code Sync Rules:

  • Only active forms (form_active = 1) participate

  • Only forms with auto-mapping enabled sync

  • Forms in "audit mode" are excluded from sync

  • Cascade forms are synced recursively

  • entry_id = 0 represents the default/template state


Support & Questions

If you encounter issues with auto-mapping:

  1. Check application logs for sync messages

  2. Verify database tables: ap_form_entries, ap_form_elements [THIS IS A CONTINUUM GRC EMPLOYEE SETTING ONLY.]

  3. Review machine code assignments in Form Builder

Enjoy the power of Continuum GRC.