Import add fields on the fly

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
sticcino
User
Posts: 1043

Import add fields on the fly

Post by sticcino »

have a module that we use importing for, working good, but need to udpate the UserId and Createdby fields in the table -- these fields aren't on the spreadsheet that is imported.

tried this but it blew up as expected:

$row["UserId"] = CurrentUserID();
$row["CreatedBy"] = CurrentUserID();
$row["DateCreated"] = CurrentDateTime();

anyway to add the additional fields or intercept elsewhere to update these fields?, i checked row_inserting event but it wasn't being triggered by the import. (v2020)


mobhar
User
Posts: 11767

Post by mobhar »

What did you mean by "but it blew up as expected"? Does it mean that that code works properly?


sticcino
User
Posts: 1043

Post by sticcino »

very strange.... its accepting the 3 fields and importing them into the table...
not sure what changed....

thanks anyways


Post Reply