Initial User Selection and Xpath

_jerome_dinnat_

15-05-2008

Hi,



I try to select an initial user by Xpath expression.

I have a form with a field name binding with commonname from the edcprincipalentity table, a field userid binding with id from the same table.

I have in my process variables username (Type string)and userid (Type string) and i try to map them with my fields but they are still empty.

I try to send a form fill by a user to a user specify in the form by fill the xpath expression in initial user selection with :

- /process_data/@iduser (doesn't work)

- /process_data/@username (does'nt work)

-

/process_data/InitForm/object/data/xdp/datasets/data/RECORDS/RECORD/commonname

(does'nt work)

- /process_data/InitForm/object/data/xdp/datasets/data/RECORDS/RECORD/id (doesn't work)



Thank you for helping me.



Sorry for my English.

Replies

Highlighted

_jerome_dinnat_

20-05-2008

Sorry 😛



I created a form in LiveCycle Designer. In this form, there are two fields "commonname" and "id" binding with fields of the XML Schema edcprincipalentity I created.



In my process, an user fills the field commoname with the name Tony Blue for example. An other user receives the form but the id field is still empty.



I though the field will fill automatically.



I must use a SQL statement to retrieve the id in the table and map it in the form.



I don't understand how it works really.



Can you explain me please ? It would be very nice 🙂



Thank you.
Highlighted

Jasmin_Charbonn

20-05-2008

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