I'm assuming your using and the same xfaForm variable for both users (let's called them userA and userB).
When userA fills the form and type the name Tony Blue in the commonname field and hit submit, the value Tony Blue is stored in the xfaForm variable under the schema element that is map to the commonname field (could be the same name).
Now you can get the value from that node using the xPath you've used in a previous post and make a database call to get the associated ID from the database. This WON'T happen automatically unless you make a client side webservice call to get that info.
Now using a similar xPath you can set the id field in your xfaForm variable with the value returned from the database call. Then the form should show the commonname and id values for userB.
I'm not sure what you mean by this statement: "In this form, there are two fields "commonname" and "id" binding with fields of the XML Schema edcprincipalentity I created", so my explanation might not make sense.
Jasmin