How to clear out the field on target table via Transform Map

Manoj Narahari1
Kilo Explorer

 

I am having similar problem but via excel upload.  How to clear out the field on target table via Web Service + Transform Map

There are different asset managers and they want to upload their own different set of asset field to be updated. But the problem is either it ignores all the field values or copy. I would like to ignore field if there no column in the excel sheet and copy if there is column and value is empty.

Any help?

 

 

5 REPLIES 5

manish64
Giga Guru

check for coalesce property once   

Hi Manish,

 

Thanks for replying me.

The problem is with 'copy empty fields' field. It either copies, if set to true, if the column value is blank or if the column(field) itself is not uploaded. I would like to empty the target field if the field is present in the excel uploaded but value is empty and ignore if field itself is not uploaded.

Regards,

Manoj Narahari. 

manish64
Giga Guru

u could make use onbefore transform script to 

 

I was able to get this working with the following onBefore script:

 

Note: The team sent in the value 'empty\null', rather than 'NULL' used by many others on the community.

 

 

 

if(source.u_assigned_to == 'empty'){

 

  target.assigned_to = '';

 

} else {

 

  target.assigned_to = source.u_assigned_to;

 

}

Hi Manish,

Problem is even the field/columns not uploaded via excel are coming as null. For example, If Assigned to is not upload via the excel sheet still source.u_assigned_to is empty. How to know if a field is uploaded with empty value or not uploaded at all via excel.

 

Regards,

Manoj Narahari.