Retrieving workflow status into a infopath form - data connection not displaying the status field - InfoPath Dev
in

InfoPath Dev

Retrieving workflow status into a infopath form - data connection not displaying the status field

Last post 07-26-2013 02:59 AM by seanbjack. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 07-23-2013 09:07 AM

    Retrieving workflow status into a infopath form - data connection not displaying the status field

    Hi

    I have done a search in the forum and there seems to be a couple of similar issues with this with no simple resolution so I thought I'd try ask the question again.

    I have setup a form library with an approval workflow in sharepoint 2010. I would like be able to run a set of rules within the infopath form based on the approval status. I have set a secondary data connection to the library however the status field is not available to select even though it is visible as a column/field in the form library. Does anyone have an idea how I can pull the workflow field into infopath via a data connection?

     

    Thanks

    Sean

     

  • 07-25-2013 04:16 AM In reply to

    Re: Retrieving workflow status into a infopath form - data connection not displaying the status field

    Hi Sean,

    I know that you can access workflow status fields/columns from workflow (I've done that with sharepoint designer). One possibility would then be to have a workflow run every time your infopath form changes that would copy the value of the workflow status to another column that your form can access via a data connection (so that would need to be a column you've created in your library). So the workflow just copies the status from a field you can't access to one you can. It should work but someone may have a prettier answer.

     Regards,

    Alex

     

     

  • 07-25-2013 07:07 AM In reply to

    Re: Retrieving workflow status into a infopath form - data connection not displaying the status field

    Hi Alex,

     

    Thanks for yor help on this. I have just tried this and it does work, I am able to get the value into another column and then pass it to the form. The only issue is that the workflow only runs if the form has changed and not if the workflow status has changed. Do you perhaps know if its possible to trigger the approval if the value of the approval field changes?

     

    Thanks again

    Sean

  • 07-25-2013 07:23 AM In reply to

    Re: Retrieving workflow status into a infopath form - data connection not displaying the status field

    This workflow - is it an out of the box sharepoint 'approval workflow' or is it a workflow you built that supports an approval process?

  • 07-25-2013 07:44 AM In reply to

    Re: Retrieving workflow status into a infopath form - data connection not displaying the status field

    It's an approval workflow I've built in sharepoint designer

  • 07-25-2013 08:15 AM In reply to

    Re: Retrieving workflow status into a infopath form - data connection not displaying the status field

    Right, ok. I'm still confused because:

    1. Workflows have their own 'status' such as 'in progress' or 'complete'. Make sense? So if the workflow runs sucessfully it's status will become 'complete'.

    2. The workflow may, as one of its action, set the 'Status' of a form where the 'Status' is a field that has been created by the form author (you). Are you 'promoting' that column to form library?

    My first response thought you were talking about (1). Your last response sound like you're talking about actions in (2). Please clarify?

    Also, when you say 'trigger the approval if the value of the approval field changes' can you clarify: when you say 'the approval'  do you mean the workflow?

     

  • 07-25-2013 09:06 AM In reply to

    Re: Retrieving workflow status into a infopath form - data connection not displaying the status field

    Apologies, I should have been clearer. It seems tthe problem is more as described below as I have been playing around with it

     

    I have created  2 workflows

    The first is straight forward Approval workflow (Change Request approval) -  Its is manually kicked-off when the form is ready for approval so it does not kick-off when the form changes.

    I then created another workflow (Populate Status) to populate (promote to?) the additional status column I created (as per your suggestion) with the value of the workflow status. This workflow I have set to run automatically when the item changes

    The issue I have is that when the approval workflow status is kicked-off and when the approval status initially changes to "in progress" it is not updating the status. (I have attached an example screenshot). If I open the form and close it again then it does update.

    Not sure why its doing this?

     


  • 07-26-2013 01:35 AM In reply to

    Re: Retrieving workflow status into a infopath form - data connection not displaying the status field

    FYI: When an infopath form has fields that get submitted to a sharepoint list/library to appear in a column then that is called 'promoting' fields. The fields are 'promoted' from the form to the library. Maybe you've done this before. As a side note: you can use a workflow and the action 'get inner xml' to take values from fields within your form and use them as variables in your workflow. Once they are available as variables in the workflow you can then have that workflow place them into columns in the Sharepoint list/library. I recommend this and never use the promotion method as it can complicate things when you later change the form/library/workflow. This 'get inner xml' stuff is well worth looking into.

    Your issue: the status isn't updating because the 'Populate Status' workflow isn't triggered. I think are three options.

    1. Have the Change Request approval workflow updates the 'approval status' field everytime the approval status changes.

    2. Have the Change Request approval workflow update any part of the form record as this will consitute a change and thus trigger the Populate Status workflow.

     3. Have the Change Request approval workflow 'start another workflow' namely the Populate Status workflow.

    This problems you're having are all about what can trigger what to happen. This is a difficult area. SharePoint workflows aren't great at  monitoring progress. i.e. its hard to have one workflow running waiting for some value to change. Its better in my experience to have workflows that initiate when an form/item is changed that then assess the item (looking at fields like status) and triggering actions according to the situation.

    Secondary workflows are a powerful tool in this area: http://office.microsoft.com/en-gb/sharepoint-designer-help/create-a-secondary-workflow-HA010237656.aspx

    I hope this helps and that I've understood you.

  • 07-26-2013 02:59 AM In reply to

    Re: Retrieving workflow status into a infopath form - data connection not displaying the status field

    Hi Alex

    Thanks, that really helped me make sense of it. I will try use a secondary workflow and see how that goes and will let you knwo. Thanks again for your help with this

    cheers

    Sean 

     

Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.