function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Dataloader CLI conditions in Map file

Can we implement a condition in map(.sdl) file like if LastName in Contact record is NULL it should take as 'NoNameContact' by default instead of showing error:mandatory field missing and if there is a value in CSV file it should accept.

#Mapping values
#Thu Sept 25 11:19:33 GMT 2015

If not what is alternative?
Abhishek BansalAbhishek Bansal
Hi Priyatam,

No, You cannot add an IF statement in mapping file.
The alternate is there is a checkbox in Settings of Data Loader "Insert Null Values" as you can see in below screenshot :

User-added image

I have not tried it but maybe after checking this checkbox you issue may solve.
I am not sure but you can give it a try.

If that does not work than you have to maunally update the CSV file by inserting white spaces in last name field or any other value.