none
Giving upload option in InfoPath form in SPD workflow

    Question

  • I have made a 2010 style workflow in SPD. In one of the step I have added a task form so user can approve item. SharePoint has automatically created InfoPath form for me. How can I give option to user to upload a file in that form?

    Workflow type is 2010 but SharePoint and InfoPath version is 2013.
    Saturday, December 17, 2016 6:37 PM

Answers

  • Hi,

    The InfoPath form you are referring is inbuild Task form for the workflow this task infopath form is associated with task type by the MetaData element in the workflow template definition (the .xoml.wfconfig.xml file)

    So The Attachment control or column we cannot add in the edit task form, but we can add to use the “Hyperlink or Picture” column.

    When we edit the “Approve” process in the workflow, add the “Hyperlink or Picture” column to the “Task Form Fields”. So that we can add attachment file link in the process of workflow. But you first add the documents to the SharePoint Document Library at first.

    http://blogs.msdn.com/b/edhild/archive/2011/06/01/creating-custom-workflow-task-approval-forms-with-sharepoint-designer-2010.aspx

    If in any case if you want to customize the Task form you need to create the application page using Visual studio and deploy this form as feature after that you can attach this page to your workflow by using the simple code as below.

    var taskList = Web.Lists["Your Tasks List Name"];

    var wfContentType = taskList.ContentTypes["Workflow Task"];

    wfContentType.DisplayFormUrl = "_Layouts/MyFeature/MyWorkflowTaskForm.aspx";

    wfContentType.EditFormUrl = wfContentType.DisplayFormUrl;

    wfContentType.Update();

    taskList.NavigateForFormsPages = false;

    taskList.Update();

    Using InfoPath you can also try so see the below link

    https://www.codeproject.com/articles/195348/sharepoint-2010-state-machine-workflows-with-custo


    KRISHANA KUMAR

    SharePoint Architect

    Mosstechnet-kk.com

     

    Please click "Mark As Answer" if this post solves your problem or "Vote As Helpful" if it was useful

    Sunday, December 18, 2016 9:09 PM

All replies

  • Anyone???
    Sunday, December 18, 2016 9:53 AM
  • Hi,

    The InfoPath form you are referring is inbuild Task form for the workflow this task infopath form is associated with task type by the MetaData element in the workflow template definition (the .xoml.wfconfig.xml file)

    So The Attachment control or column we cannot add in the edit task form, but we can add to use the “Hyperlink or Picture” column.

    When we edit the “Approve” process in the workflow, add the “Hyperlink or Picture” column to the “Task Form Fields”. So that we can add attachment file link in the process of workflow. But you first add the documents to the SharePoint Document Library at first.

    http://blogs.msdn.com/b/edhild/archive/2011/06/01/creating-custom-workflow-task-approval-forms-with-sharepoint-designer-2010.aspx

    If in any case if you want to customize the Task form you need to create the application page using Visual studio and deploy this form as feature after that you can attach this page to your workflow by using the simple code as below.

    var taskList = Web.Lists["Your Tasks List Name"];

    var wfContentType = taskList.ContentTypes["Workflow Task"];

    wfContentType.DisplayFormUrl = "_Layouts/MyFeature/MyWorkflowTaskForm.aspx";

    wfContentType.EditFormUrl = wfContentType.DisplayFormUrl;

    wfContentType.Update();

    taskList.NavigateForFormsPages = false;

    taskList.Update();

    Using InfoPath you can also try so see the below link

    https://www.codeproject.com/articles/195348/sharepoint-2010-state-machine-workflows-with-custo


    KRISHANA KUMAR

    SharePoint Architect

    Mosstechnet-kk.com

     

    Please click "Mark As Answer" if this post solves your problem or "Vote As Helpful" if it was useful

    Sunday, December 18, 2016 9:09 PM