Excel Import for existing data..

0
Hi, Can anyone please assist on below issue I have an application, In that application Account details are already exists,But I have to add/import few more accounts which may   be new accounts or existing accounts with slight modification to accounts such as role, etc. I have tried to upload data/accounts, but I am getting error saying that Username already exists and for your information Right now I am using Synchronize Objects as import action. please find below image for error message.   Thank you.  
asked
4 answers
1

What is the configuration of your excel importer like? You can choose what happens with records, you can choose to only create new ones, to update existing records, etc. Setting that to the right value for your case should fix your error. 

 

image.png

answered
1

Hi Abishek,

I would recommend importing your data into one or more non-persistable entities (depending on your data structure of course), then use a microflow to map your data into its persistable counterpart, allowing you to catch errors and deal with them how you would like. Giving you the possibility to create a more user friendly import and feedback.

answered
0

The error happens when you intend to synchronize, but one of the records is missing in the database. mx tries to add it. Check to ensure all records already exist before importing.

answered
-3

Hi Abhishek

 

If I understand the issue, I present some insights, and potential solutions

 

  1. Update Existing Accounts:

    • If the accounts already exist but you need to modify certain attributes (e.g., role), make sure that your import file includes the necessary information for these modifications.
    • Ensure that the import data includes a column for the username and the corresponding changes you want to make.
  2. Use the Correct Import Mapping:

    • Verify that your import mapping in Mendix is correctly configured to handle both new accounts and modifications to existing accounts.
    • Double-check the mapping to ensure that the data in your import file aligns with the expected format and fields in Mendix.
  3. Handle Duplicates in the Import File:

    • If your import file contains both new accounts and modifications to existing accounts, make sure that there are no duplicate usernames.
    • You may need to preprocess your import file to handle duplicates or ensure that modifications to existing accounts are in separate rows from new accounts.
  4. Check Synchronization Options:

    • Since you mentioned using "Synchronize Objects" as the import action, review the synchronization options provided by Mendix during the import process.
    • Adjust the synchronization settings to match your requirements, and ensure that you're not creating conflicts with existing data.
  5. Review Constraints and Validation Rules:

    • Check if there are any constraints or validation rules in your Mendix data model that might be causing conflicts during the import.
    • Temporarily relax constraints or validation rules during the import process to identify and resolve issues.
  6. Logging and Error Messages:

    • Check the Mendix logs and error messages for more detailed information about the specific errors during the import process.
    • Mendix should provide insights into which records are causing conflicts, allowing you to address them individually.

 

** Kindly  accept my answer if it assist you to solve your problem.

answered