none
Show Current Item Field Information on Workflow Initiation Form

    Question

  • Hello, I am using SharePoint 2010 Enterprise, SharePoint Designer 2010, and InfoPath 2010. I am working with a list workflow.

    What is the best way to add a couple of fields from the Current Item to the workflow initiation form? My aim is to show details of the current item before the user starts the workflow.

    Is this possible? I found a way of showing all items in a field through a repeating table, but that wasn't desirable.

    Thanks!

    Thursday, January 12, 2012 6:39 PM

Answers

  • Hi ,

     

    Here is a workaround:

    1.       Open the workflow in SharePoint Designer .

    2.       Add initiation form parameters to the workflow .Give the parameter the same name as the columns in the list .Remember to add a parameter called ID .

    3.       Open the initiation form in InfoPath .Add a data connection to receive data from the list .

    4.       Add a rule on the ID field .Choose the action as ‘Set a field’s value’ .

    5.       Set an initiation parameter  such as Title to get the value from the Title column in  list data connection .

    6.       Add a filter on the Title column :ID(main data connection ) equals ID (list data connection ) .

    7.       In this way , the current item field will show up after you fill in the ID column on the initiation form .The ID column is shown in the URL when you start the workflow in IE .

     

    Thanks

    Entan Ming

    TechNet Community Support

    Monday, January 16, 2012 4:17 AM
    Moderator
  • Hi ,

     

    Here are the detailed steps :

    1.       I created a workflow on the Tasks list .I want to show the Title and Assigned To column on the workflow Initiation form .First add three initiation parameters named ID ,Title, Assigned To.

    2.       Open the initiation form in InfoPath .Add a data connection to receive data from the Tasks list .

    3.       Click on the ID column and choose Mange Rules .

    4.       Add a rule .Don’t add any condition .Set the action as ‘Set a field’s value’ .

    5.       In the next window ,choose the Field as ‘Title’ .

    6.       Click on ‘fx’ button behind the Value >Insert  field or group>Choose Title column form the Tasks data connection .

    7.       Click on filter data before click OK button .

    8.       Add a filter like this ID(in main data connection ) is equal to ID (in Tasks data connection ).

    9.       Add another action in the rule to set the field’s value for Assigned To column .

    10.   Save and publish the form .

     

    Thanks,


    Entan Ming

    TechNet Community Support

    Wednesday, January 18, 2012 2:13 AM
    Moderator

All replies

  • Hi ,

     

    Here is a workaround:

    1.       Open the workflow in SharePoint Designer .

    2.       Add initiation form parameters to the workflow .Give the parameter the same name as the columns in the list .Remember to add a parameter called ID .

    3.       Open the initiation form in InfoPath .Add a data connection to receive data from the list .

    4.       Add a rule on the ID field .Choose the action as ‘Set a field’s value’ .

    5.       Set an initiation parameter  such as Title to get the value from the Title column in  list data connection .

    6.       Add a filter on the Title column :ID(main data connection ) equals ID (list data connection ) .

    7.       In this way , the current item field will show up after you fill in the ID column on the initiation form .The ID column is shown in the URL when you start the workflow in IE .

     

    Thanks

    Entan Ming

    TechNet Community Support

    Monday, January 16, 2012 4:17 AM
    Moderator
  • Hi Etan,

    I have not understood how you set the ID field at point 4 and after how you filter values. Can you explain this better please?

    Tuesday, January 17, 2012 12:12 PM
  • Hi ,

     

    Here are the detailed steps :

    1.       I created a workflow on the Tasks list .I want to show the Title and Assigned To column on the workflow Initiation form .First add three initiation parameters named ID ,Title, Assigned To.

    2.       Open the initiation form in InfoPath .Add a data connection to receive data from the Tasks list .

    3.       Click on the ID column and choose Mange Rules .

    4.       Add a rule .Don’t add any condition .Set the action as ‘Set a field’s value’ .

    5.       In the next window ,choose the Field as ‘Title’ .

    6.       Click on ‘fx’ button behind the Value >Insert  field or group>Choose Title column form the Tasks data connection .

    7.       Click on filter data before click OK button .

    8.       Add a filter like this ID(in main data connection ) is equal to ID (in Tasks data connection ).

    9.       Add another action in the rule to set the field’s value for Assigned To column .

    10.   Save and publish the form .

     

    Thanks,


    Entan Ming

    TechNet Community Support

    Wednesday, January 18, 2012 2:13 AM
    Moderator
  • I am following these instructions Entan. On step # 3 you say "Click on the ID column and choose Mange Rules ."

    Which ID column is that? The only from the tasks list, or the one from the Workflow initation variable? Also, wah is the difference between the queryFields an dataFields sections?

     

    Monday, January 23, 2012 5:10 PM
  • Also, the ID (secondary data connection), contains a list of all of the IDs from my form library. I want to just receive the current ID associated with the list Workflow.
    Monday, January 23, 2012 5:13 PM
  • Nevermind, I found out a way to display this information on later task forms (albeit, not the initation form) here: http://social.technet.microsoft.com/Forums/en-US/sharepoint2010customization/thread/878e6152-24fe-4169-a541-c3dfc8dd85c0/#cb8353c9-5746-4d24-af77-c939b7281b37/ 
    Wednesday, January 25, 2012 10:27 PM
  • Hi Entan,

    Is it possible to get the current Item ID from the workflow properties to filter and display in the initiation form, instead of manually looking into id value in the URL and typing in the ID field  in the initiation Form.

    Thanks the article...


    Friday, November 14, 2014 1:52 PM
  • MY QUESTION EXACTLY!  I have been looking all over for an answer.

    I am working in Office 365 with SharePoint Designer 2013 and InfoPath 2013.  I would love to find a way for the InfoPath initiation form to be able to use the ID from the workflow URL to query and filter the secondary data connection, so that I can display item data on the initiation form.  This way the user can be sure they are running the workflow on the item they meant to run it on.   

    And although the solution above is clever, I, too, like G V L Subrahmanyam, do not want the user to type the ID into the form in order to populate it. 

    I have not found an answer yet but will keep on looking I guess.  I was just glad to see that someone else has the same question.  I would think this would be a super common need.....

    PS: someone did provide a javascript example to extract the ID from the URL, http://www.jquerybyexample.net/2012/05/how-to-get-querystring-value-using.html, but they mentioned inserting it through Tools > Programming menu in InfoPath, but that does not exist on my InfoPath form. I have not received an answer from them about how I should proceed given that I do not have access to a Tools>Programming option.


    Betty Stolwyk

    Thursday, March 19, 2015 9:20 PM