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

10 REPLIES 10
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?

View solution in original post

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (1,743)