Expand my Community achievements bar.

How to show user name for a person who the task is assigned to

Avatar

Former Community Member

Hi,

Can any one show me how to show the user name (full name) of the person who the task is assigned to. e.g I am working on the request form that need to show the name of that form submitter  in the signature field when he/she submitted the form to the supervisor for an approval, then when the supervisor open the form, the supervisor's name will also show on his/her signature field.

Thanks in advance,

Han Dao

14 Replies

Avatar

Former Community Member

Are you referring to a digital signature field or a text field containing the users name?

Steve

Avatar

Former Community Member

Hi Steve,

I am referrring to the text field that contains the user name. Note that the form does contain a workflow.

Thanks,

Han Dao

Avatar

Level 10

The form that gets presented for a task is rendered using a render service.

The render service is configured on the form variable (xfaForm or DocumentForm).

When you configure the render service you can pass a parameter Task->User Name to the render service.

You can add a extra input variable on your render service to hold that information.

In the render service you can change the data that gets merge with the form  (inDataDoc) to contain that user name before it call renderForm.

Jasmin

Avatar

Former Community Member

Hi Jasmin,

Could you please explain a little bit more in details as I am getting confuse here.

Thanks,

Han Dao

>>> Jasmin Charbonneau <forums@adobe.com> 4/24/2009 12:35 PM >>>

The form that gets presented for a task is rendered using a render service.

The render service is configured on the form variable (xfaForm or DocumentForm).

When you configure the render service you can pass a parameter Task->User Name to the render service.

You can add a extra input varibale on your render service to hold that information.

In the render service you can change the data that gets merge with the form (inDataDoc) to contain that user name before it call renderForm.

Jasmin

Avatar

Former Community Member

Hi Jasmine,

Could you please explain a little bit more how I can make it work in the form.

Thanks,

Han Dao

Avatar

Level 10

Can you tell me where you need more clarification?

Are you familiar with the render service that's associated with the xfaForm variable?

Jasmin

Avatar

Former Community Member

Hi Jasmin,

The render service that I am using is a customized service that was built for my company. It uses Document for the inDocData variable. I call that render service in the Advance Setting in my process which is currently use: User-> task and User's id (this is currently used for most of the processes here). I got confused at the last 2 parts: "add an extra input variable on the render service to hold the information" and " change that data that get merge with the form to contain that user name before it call renderForm." In the customized render service, it already has "Insert User Data" before Render Form then Workspace enable form. Do I need to change any thing for this customized render service? I was told that I should not modify or update this customized render service since it may affect other process. This really make me confuse. Could you please advise me what next step should I do to my process without touching the customized render service and how can I make that user name show in the text field name in the form.

Thanks a lot in advance,

Han Dao

>>> Jasmin Charbonneau <forums@adobe.com> 4/27/2009 9:46 AM >>>

Can you tell me where you need more clarification?

Are you familiar with the render service that's associated with the xfaForm variable?

Jasmin

Avatar

Level 10

Well the render service is responsible to merge the data with the form.

Your user name has to be in the data before you render the PDF if you want the user name in a field.

If you just have the Task-> User Id, you still need to get the actual name for that user. That's why I'm saying it might be just easier to add a new parameter to the render service and pass Task -> User Name.

Otherwise you'll need to add another step to figure out the user name for a particular ID. You'll have to modify Insert User Data to insert that new piece of information.

If you can't change the render service you have two options:

1- You make a copy of the original render service and make the changes you need.

2- You'll have to make a web service call from the PDF (once rendered in Workspace) to LC to get the user name and put it in a specific field.

Jasmin

Avatar

Former Community Member

Hi Jamin,

Thanks for the prompt reply. I think I got what you suggested but would like to ask you another question. So if there are 3 different person to assigned on the task, do I need to have three different additional variables for them? Which means that when the task is completed by the first person, it will go to the second one, then third one to complete the whole process. Note that the second person won't see any task until the first one is completed and so on.

Thanks again,

Han Dao

Avatar

Level 10

You can reuse the same variable for the three task.

Jasmin

Avatar

Former Community Member

Hi Jamin,

Could you please guide me how to pass that user name to the form, I am not sure why it does not show on the form but I can see it return the user name while I playback the recording in the workbench.

Thanks,

Han Dao

Avatar

Level 10

Are you getting the user name in the render service?

If yes, you need to set the data element that should contain the user name with that value using a setValue. Then you can pass that xml (that contains the form data) to the render step.

Jasmin

Avatar

Former Community Member

Hi Jasmin,

Yes, I did get the user name in the render service. I also set the data element that contain user name by using set value but still could not get the user name to show on the form. Here is what used: location: process_data/@EmplSign where EmplSign is the variable that store the username and expression: /process_data/form/object/data/xdp/datasets/data//EmplSign where EmplSign is the name of the field on the form. I don't see the xml path for the field in the XPath Builder list so I used "//" instead.  I can see the username is returned in the recording but still not sure why it does not pass to the form. Do I have to build the schema for the form then use the variable based on that schema? If so, would you please show me how I can build the xml/xsd schema from the xdp form.

Thanks much again.

Regards,

Han Dao

Avatar

Level 10

I don't think you can use the '//' notation to set a node. This is an xPath search expression.

You might have to put the entire node structure in there ( /process_data/form/object/data/xdp/datasets/data/node1/node2/EmpName). Write /process_data/form to the file system to get a better view of the structure.

Jasmin