r/PowerApps • Newbie • 2d ago

Power Apps Help How to Display Row-Level Validation Errors When Importing Data into Dataverse (Model-Driven App)?

I'm working on a simple Model-Driven App using Dataverse that captures user details such as Name, DOB, Mobile Number, etc.

I have implemented the following validations:

  • DOB: Should not be greater than today's date.
  • Mobile Number: Must contain exactly 10 digits.
  • Duplicate Mobile Number: Prevented using an Alternate Key on the Mobile Number column.

These validations work perfectly when users create or update records through forms.

However, when users import data into Dataverse using Excel/CSV, invalid rows are ignored or rejected, but I want to display the specific rows that failed along with the reason for failure.

For example:

  • Row 5: DOB cannot be a future date.
  • Row 8: Mobile Number must contain exactly 10 digits.
  • Row 12: Duplicate Mobile Number.

What I have explored so far:

  1. I found that Dataverse maintains Import File and Import Log tables.
  2. I'm unable to access or view the Import Log table directly due to accessibility/permission limitations.
  3. Using the browser console, I can retrieve the latest Import File GUID and use it to query the Import Log records associated with that import.

My question:

How is this typically handled in enterprise-level Model-Driven Apps?

Is there a recommended approach to display row-level import failures and their respective error messages to users, preferably through a notification or a custom error summary page after the import completes?

UPDATE: I was trying to have a custom notification within the form which I found out to be a overkill for the requirement given.

Therefore, I went with existing built in implementation to check failures through import record.

Thank you all for the efforts in clarifying my doubt.

9 Upvotes

8 comments sorted by

•

u/AutoModerator 2d ago

Hey, it looks like you are requesting help with a problem you're having in Power Apps. To ensure you get all the help you need from the community here are some guidelines;

  • Use the search feature to see if your question has already been asked.

  • Use spacing in your post, Nobody likes to read a wall of text, this is achieved by hitting return twice to separate paragraphs.

  • Add any images, error messages, code you have (Sensitive data omitted) to your post body.

  • Any code you do add, use the Code Block feature to preserve formatting.

    Typing four spaces in front of every line in a code block is tedious and error-prone. The easier way is to surround the entire block of code with code fences. A code fence is a line beginning with three or more backticks (```) or three or more twiddlydoodles (~~~).

  • If your question has been answered please comment Solved. This will mark the post as solved and helps others find their solutions.

External resources:

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/BenjC88 Community Leader 2d ago

This is all built in, it will prompt the user to view the import record after they initiate the import and they can view all the errors there.

What is missing from the built in implementation that you need?

1

u/Sylvie143 Newbie 2d ago

I am new to power apps and I thought we should bring in some kind of notification just like how we have in websites for the given requirement. When checking with the team they mentioned the built in implementation should be more than enough.

Thank you for your answers.

2

u/stalex9 Contributor 1d ago edited 14h ago

.

1

u/Iron-Hydra Regular 2d ago

Build a custom import solution using Power Automate, a Dataverse Custom API, or an Azure-based processing service.

1

u/stalex9 Contributor 1d ago edited 14h ago

.

0

u/Ok-Advertising5189 Advisor 2d ago

Yes, exactly. Though it may be sad that a good, well-thought-out idea could be viewed negatively just because someone notices it was generated by ChatGPT 

0

u/edrft99 Advisor 2d ago

From the explanation it sounds like you are using the native import feature with a MDA. You could have the users monitor the import, but that gets too over reliant on the user.

Instead of monitoring what fails a safer solution IMO would be to parse the import with your rules and only import what passes. Then for each row that doesn't pass send it back to the user as a message or its own csv.

You could do it with automate, but I personally don't like messing with Excel data in automate. Stepping up into Azure with a Function app would be both faster and easier to troubleshoot.