display comments and workflow history on infopath form
-
יום רביעי 30 מאי 2012 18:14
Hi ,
I want to display workflow history and comments on infopath form. I havent created workflows yet. Can any one suggest the approach to work on workflows.
SPDEV2010
כל התגובות
-
יום חמישי 31 מאי 2012 07:43מנחה דיון
Hi SPDEV2010,
If you use approval workflow (Start Approval Process action), we need to copy the comments field to a list field first, since we cannot get the comments outside the approval process.
To copy the comments, please go to edit single task of the approval task > Under When a Task Completes section, add Update list item action: Update Association Task List: Copy comments field = Current Task: Comments [where ID = Current Task: ID]
See Entan Ming’s post for the details about how to find the edit single task process.
http://social.technet.microsoft.com/Forums/en-us/sharepoint2010customization/thread/536f5b81-b364-45c2-9918-443933487a8bSo we can already get the comments from the copy comments field in associated task list.
Next step is to display all workflow comments associated with current list item is the InfoPath form. (So we are customizing a list form)
- Create a receiver data connection to receiver from task list.
- Insert the task list data source as repeating table to the form.
- Add formatting rule to the task repeating table:
When Task: Title is not equal to “your workflow task name”
and substring-after(WorkflowLink, "=") is not equal to Main: ID
Hide this control.
WorkflowLink field in substring-after(WorkflowLink, "=") formula is the Task: Related Content field. Because that we can only get list item info from the Related Content field, we need to subtract extra string from Related Content field and only left the current list item ID using this formula: substring-after(WorkflowLink, "=").
4. Done.
Similar for the other workflow actions and tasks.
Thanks & Regards,
Emir
Emir Liu
TechNet Community Support
- נערך על-ידי Emir LiuMicrosoft Contingent Staff, Moderator יום חמישי 31 מאי 2012 07:44
-
יום חמישי 31 מאי 2012 07:54
Hi SPDEV2010
To access workflow history list please open SPD2010 and then select All Files -> Lists -> Workflow History. Highlight AllItems.aspx and click "Preview in Browser" from the spd2010 ribbon.
You should be able to see all logs for the workflows on your site.
Now in infopath you just need to connect to this list and display Description field by filtering down by ListID and PrimaryItemID.
Hope this will help.
Regards, Marcin (Please mark as helpful or answered if it helps)
-
יום חמישי 31 מאי 2012 13:12
Basically what i have done is created an infopath form with multiple views. each view have its own approval and reviewer people. the views are presented in a tabular wizard so tab1 contains view1, tab2 contains view2 and tab3 contains view3. First the user enters the view1 page.At this time other tabs are not accessable.once user enter data on view1 and click on submit button then the information is sent to approval department.then they sent this document to reviewer department for their decisions or collection feedback giving time to respond. based on their comments and decisions the approval take final decision and sent it back to user. Say if approver requires more info he would send back to user asking for additional info. if approver approves the document then it returns to user and next view unlocks and user can enter info. Also each view have their own reviewers even approver is same for all.
Also i need to capture comments written by approver ,reviewer and user along with workflow history and place it in infopath form.
the comments of reviewer and workflow history of reviewer cannot be seen by user. The user can only see the approver actions and comments of approver. while approver and see all of the people comments.
can u give me step by step workout of the sharepoint designer workflows and what kind of workflows(eg: approval or 3 state or collection feedback) i need to create. I am not sure about initiation and association forms either.
SPDEV2010
-
יום שלישי 05 יוני 2012 02:22
Basically what i have done is created an infopath form with multiple views. each view have its own approval and reviewer people. the views are presented in a tabular wizard so tab1 contains view1, tab2 contains view2 and tab3 contains view3. First the user enters the view1 page.At this time other tabs are not accessable.once user enter data on view1 and click on submit button then the information is sent to approval department.then they sent this document to reviewer department for their decisions or collection feedback giving time to respond. based on their comments and decisions the approval take final decision and sent it back to user. Say if approver requires more info he would send back to user asking for additional info. if approver approves the document then it returns to user and next view unlocks and user can enter info. Also each view have their own reviewers even approver is same for all.
Also i need to capture comments written by approver ,reviewer and user along with workflow history and place it in infopath form.
the comments of reviewer and workflow history of reviewer cannot be seen by user. The user can only see the approver actions and comments of approver. while approver and see all of the people comments.
can u give me step by step workout of the sharepoint designer workflows and what kind of workflows(eg: approval or 3 state or collection feedback) i need to create. I am not sure about initiation and association forms either.
SPDEV2010
-
יום חמישי 02 אוגוסט 2012 19:47
Hi Marcin -- Can you give more concise steps for filtering the workflow histories? I am able to import all of the workflow history into my form, but am unsure how to filter using ListID and PrimaryItemID.
Thank you!
-
יום שני 06 אוגוסט 2012 12:29
Hi
I once you have data source created to the workflow history list all you need to do is to filter that data by ListID and PrimaryItemID.
I guess PrimaryItemID is the the task ID and ListID is the guid which you can get from spd2010 when you access the list.
To filter this in info path all you need to do is to provide listID which is fixed and based on item id filter the data source.
Hope this helps.
Regards, Marcin (Please mark as helpful or answered if it helps)