source.sys_import_state_comment display empty

CKJ-BeOS
Tera Contributor

Hi,

 

On Transorm Map into an "OnAfter" script, i use the "source.sys_import_state_comment" to display information about the action, but in result Import set the information is empty.

It is working or not into onAfter script ?

 

Regards,

Cédric

5 REPLIES 5

sizzleMcFace
Mega Guru

Hi,

 

What exactly are you using source.sys_import_state_comment for in the onAfter script? Are you trying to set it or read it?

 

The "sys_import_state_comment" field is managed by the system and is used to store comments about the import state of each row. Typically, you can write to it in onBefore or onEach scripts to set status messages for rows during transformation. If your goal is to log or display import comments, you should do it in onBefore or onEach script. In onAfter, you usually work with the target record, not the import set row.

 

If you need to preserve comments from source for auditing, consider copying them to a target field during transformation, because sys_import_state_comment may no longer be reliable in onAfter.

Hi, thanks

I undrstand, i need to be onAfter because need the record on insert action exist, i would like to add information to give the last action made into onAfter is succesfull.

 

Regards,

Cedric

I believe in that case you will have to do something like:

 

if target.operation==“insert”

target.field_name= “inserted”


Raghav
MVP 2023

RaghavSh
Kilo Patron

Your question is not clear, OOB import set rows shows the state of each row in import set like error, insert, update.

 

what extra information you require.


Raghav
MVP 2023