none
Is it possible to add fields from infopath form library to a workflow task list tied to that same form library?

    Question

  • I am using Infopath 2010, Sharepoint Designer 2010, Internet Explorer 9, and SharePoint 2010 Enterprise. I have a workflow tied to an infopath browser-based form library . There are several custom tasks assigned to the workflow.

    My request has to do with the task assignment window. I really need to display fields from the correpsonding form. Is there anyway in Infopath that I can modified the task for and/or add the columns to the workflow task list in SharePoint?

    Thanks in advance!

    Friday, January 20, 2012 12:18 AM

Answers

  • Hi epistrophy25,

    If you have created a reciver data connection, we can't modify its (default ) value in InfoPath. To update the data changes back to the library/list, we can use Lists.asmx web service and its updatelistitems funtion.
    Or we can use another field in the Main data connction to get value from the second connection, and Restructure the string there. 

    Best regards,
    Emir


    Emir Liu

    TechNet Community Support

    • Marked as answer by epistrophy25 Wednesday, January 25, 2012 10:20 PM
    Wednesday, January 25, 2012 6:22 AM
  • Hi,

    As promised ..please find the step-by-step of building advanced InfoPath form with custom task form.

    http://gallery.technet.microsoft.com/Step-By-Step-build-30f84363

    I hope this helps.

    Megren,


    www.megren.net
    • Marked as answer by epistrophy25 Wednesday, January 25, 2012 10:20 PM
    Wednesday, January 25, 2012 8:03 PM

All replies

  • Hi epistrophy25,

    Yes, we can display the resource data in the task form.

    First, we need to publish the form fields as SharePoint library fields.
    Then, we can add a second data connection to the task form to reciver data from the form library. In task list, there is a field linked to the resouce library item Name and we can find the item ID from the field, then we can use the ID field to filter the library data source and get the right item data.

    Best regards,
    Emir


    Emir Liu

    TechNet Community Support

    Monday, January 23, 2012 8:54 AM
  • Emir, this is exactly what I am looking for. Is it possible you can write out step-by-step instructions for me with an example?
    Monday, January 23, 2012 4:35 PM
  • Hi epistrophy25,

    Almost the same step in this blog.
    http://it.toolbox.com/blogs/sharepoint-blog/infopath-tip-showing-filtered-column-from-a-sharepoint-list-28149

    Best regards,
    Emir


    Emir Liu

    TechNet Community Support

    Tuesday, January 24, 2012 6:16 AM
  • Hi epistrophy25,

    Almost the same step in this blog.
    http://it.toolbox.com/blogs/sharepoint-blog/infopath-tip-showing-filtered-column-from-a-sharepoint-list-28149

    Best regards,
    Emir


    Emir Liu

    TechNet Community Support

    Gosh, I still think that this won't do it for me. When I connect to the SharePoint Form Library as a secondary data source, any of the fields I am looking for show up in a repeating box. So, if I have four forms, I see four IDs listed in the infopath task form. I really need a way to find the current ID for the Form Library and then filter the other fields I want based on that to show up in the infopath task form.

    You mentioned that there is a field linked to the resource library item name and that can be used to find the item ID from the field. Can you explain how you do that? I am sorry for the trouble. I think I am close to finding an answer though!

    Tuesday, January 24, 2012 6:23 AM
  • Then you need to query only that ID or some other parameter that is known.  You always have to do this.  You must tell the data connection what to retrieve (parameterized query) or what to filter upon retrieval.  One way or another, there has to be a foreign key to associate the task to the proper form.  I don't know of a way to get the ID - it is not stored directly in the task.  There is a reference field, but it uses the name of the original item, though it may also contain the ID in a concatenated string in the raw XML.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    Tuesday, January 24, 2012 7:06 AM
  • Hi epistrophy25,

    In task list, there are 2 link fields by default display the list item Title/document Name, related content and Title field. We can find document Name from the hyperlink of the related content, and document item ID from the Titile field.

    To get the part of the document name/item ID to a task field, we can copy the related content/Titl field to another text field, and using calculate field to get the name part/ID paramter from the hyperlink.

    Best regards,
    Emir


    Emir Liu

    TechNet Community Support

    Tuesday, January 24, 2012 7:35 AM
  • Then you need to query only that ID or some other parameter that is known.  You always have to do this.  You must tell the data connection what to retrieve (parameterized query) or what to filter upon retrieval.  One way or another, there has to be a foreign key to associate the task to the proper form.  I don't know of a way to get the ID - it is not stored directly in the task.  There is a reference field, but it uses the name of the original item, though it may also contain the ID in a concatenated string in the raw XML.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force

    Thanks Clayton and Eimr! I think I can sucessfully associate the infopath task to the form through the "Related Content" field that is present on all of the custom workflow task forms in the Main Data Connection (i.e. but NOT the Workflow initiation form).

    The Related Content field has the same name as the Title in the Form Library. It is worth nothing that the Title form library field has .xml in the string where the Related Content field does not have the extenstion. I'll have to do something like filter on [Related Content]".xml"

    I am now inside infopath with one of the custom task forms. Unfortunately all of the options to change the default values for the secondary data connection attached to the Form Library are greyed out. I am logged into Infopath 2010 and SPD 2010 with a site collection administrator account.

    Am I doing something wrong? Here's a screenshot

     

    Thank you so much for pointing me in the right direction. I am so close!

    Wednesday, January 25, 2012 12:47 AM
  • Hi epistrophy25,

    If you have created a reciver data connection, we can't modify its (default ) value in InfoPath. To update the data changes back to the library/list, we can use Lists.asmx web service and its updatelistitems funtion.
    Or we can use another field in the Main data connction to get value from the second connection, and Restructure the string there. 

    Best regards,
    Emir


    Emir Liu

    TechNet Community Support

    • Marked as answer by epistrophy25 Wednesday, January 25, 2012 10:20 PM
    Wednesday, January 25, 2012 6:22 AM
  • Hi,

    As promised ..please find the step-by-step of building advanced InfoPath form with custom task form.

    http://gallery.technet.microsoft.com/Step-By-Step-build-30f84363

    I hope this helps.

    Megren,


    www.megren.net
    • Marked as answer by epistrophy25 Wednesday, January 25, 2012 10:20 PM
    Wednesday, January 25, 2012 8:03 PM
  • Thank you so much Megren! What a good document and so helpful for the community.

    Emir's suggestion to use a field from the Main data connection (via a SPD Task Form Field) and set its default value in Infopath from the desired Form Library field filtered by the Title of the Related Content field did it for me. This is the same logic as your doc on page 28, although I used the default value rather than a rule to display the content.

    Thank you Megren, Emir, and Clayton for all of your help!

     

    Wednesday, January 25, 2012 9:59 PM
  • Here's some screenshots of how I setup the default value field in Infopath
    Wednesday, January 25, 2012 10:22 PM