Update field value after save a node My content type has a field call tracking code, I have granted permission for users are able to create content. When they create content, they cannot see tracking code field but after they submit the content, they will see a tracking code string in message area.

In that node I also have reference field with other content type, so the string that I expect to show must include the id of reference node and id of the node being created.

EX: P1C2 (1 is id of reference node, 2 is id of node being created)

Does drupal have any modules support to do that or I must do it programmatically and how can I build the coding for that? Thank you all!
You could use the computed field module.


  Computed Field is a very powerful field module that lets you add a
  custom "computed fields" to your content types. These computed fields
  are populated with values that you define via PHP code. You may draw
  on anything available to Drupal, including other fields, the current
  user, database tables, you name it. (Feeling the power yet? :) ) You
  can also choose whether to store your computed field values in the
  database with other content fields, or have them "calculated" on the
  fly during node views. (Although you should note that Views use
  requires database stored values.) This field is literally the Swiss
  Army knife of fields. So start cooking up your PHP based values!


You can get all the information that you add in other fields with in the computed field. Since you have not yet saved the node you might want to add the following code at the beginning to make the nid available.

https://drupal.org/node/149225