I guess that format function is needed in the parameters, but is there any other references or setting to add ?
Nope, you'll just need format functions enabled and to use a Field action. Should work fine.
What would you suggest for trigger : onafteruserregistration only ?
Yes, if you want it to apply to frontend registrations only.