cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pinja
Helper I
Helper I

"Attribute ... cannot be NULL" error for optional attributes while importing data

I'm using the import wizard for importing data, but am getting this error for some fields, even if they aren't required (they're required in a business process, though). I could put some dummy values in but that seems silly. Any way to fix this?

2 ACCEPTED SOLUTIONS

Accepted Solutions

It shouldn’t complain then unless you have some synchronous workflows or plugins that throws some errors?

View solution in original post

pinja
Helper I
Helper I

Not completely sure yet, but it seems that the problem was that some business rules changed certain fields into required fields (e.g. if field A is true, then field B is required). Disabling those rules seems to have helped.

 

EDIT: It works!! Yay.

View solution in original post

12 REPLIES 12
cchannon
Super User
Super User

Optional and non-nullable aren't the same thing. Some columns are non-nullable, such as boolean or integer columns.

 

Because your columns are optional, you could provide them in your import or not, DV won't care. But, if you're going to include those columns in your import, you can't just give null values, you have to give a valid non-null value.

What are valid null values for choices, lookups and dates? Should I just try with NULL?


EDIT: Well I tried NULL and it didn't work. Oh and it wasn't happy with me not including the columns at all, either.

those are nullable field types

The import wizard seems to disagree with you, unfortunately 😞

"...wasn't happy with me not including the columns..."

 

What do you mean? if they are optional columns and they are not in your import then there is no problem. You must have some other problem, like an incorrect data map during import or something.

Hi @pinja, in your CSV import file, just keep those cells as empty, even boolean fields/columns. 


@cchannon wrote:

"...wasn't happy with me not including the columns..."

 

What do you mean? if they are optional columns and they are not in your import then there is no problem. You must have some other problem, like an incorrect data map during import or something.


I mean that it gave me the same "Attribute x cannot be NULL" error for columns I left out completely.

 

It might be another problem, sure, but if it is it isn't telling me about it...

They are empty currently, and that's exactly what it seems to be complaining to me about.

It shouldn’t complain then unless you have some synchronous workflows or plugins that throws some errors?

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (2,379)