ttAPInvDtl update

I am using BPM to pass a value of the project ID to Invoice details table but I can't seem to get the value to save on the table during the custom form process.
Code:
FOR EACH ttAPInvDtl, first porel WHERE porel.PONum = ttAPInvDtl.PONum AND porel.company = ttAPInvDtl.company AND porel.POLine = ttAPInvDtl.POLine AND porel.PORelNum = ttAPInvDtl.PORelNum NO-LOCK.
IF AVAILABLE porel THEN
ASSIGN ttAPInvDtl.Character01 = porel.ProjectID.
END.

Any help?

Thank you,

Jo Brifo