Retrieve rule returning the same value from SP list field - InfoPath Dev
in

InfoPath Dev

Retrieve rule returning the same value from SP list field

Last post 07-02-2012 07:42 AM by guillo49. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-29-2012 08:17 AM

    Retrieve rule returning the same value from SP list field

    I am new to InfoPath and I'm trying to change the views of my form based on a status value coming from a SP2010 list. I have published a form to a SP2010 list which has additional fields that can be updated in SP. The SP field "PR Status" is a choice field with "Open", "In Process", and "Closed" as the only values. When the form is first submitted by the user the default value is set to "Open". When the admin reviews the form and validates it he sets the status to either "In Process" or "Closed". Here is where the problem begins.

    If the PR status is set to either open or closed I want to have the form, when re-opened, to switch to a Read Only view that I have setup. Here is what I've done:

    1 - setup a retrieve data connection to get the PR Status field

    2 - added form open rule to a) retrieve the PR Status field and set a form field called "current_status" to be equal to PR Status.

    3 - a condition is set that if the PR Status is In Process or Closed, display the read only form.

    The problem is that the field always read "In Process" not matter that the SP record is set to "Open" or "Closed". I am then unable to change to the correct view.   

    HELP !!! what am I missing?

  • 06-29-2012 12:29 PM In reply to

    Re: Retrieve rule returning the same value from SP list field

    Hi:

    So, when the admin sets the status - is that control bound to a main data source field? Like, does the form have a "Status" field?

    I'd think the form open rules would be based off a value stored in the form, not off data from a secondary data source....

    Hilary Stoupa

  • 06-29-2012 03:51 PM In reply to

    Re: Retrieve rule returning the same value from SP list field

    The Status is stored on the SP list not the form. The admin wants to set the status in SP since it would eliminate him from having to access the form to change the status. I tested the retrieve by displaying the status coming back from the SP list and it present the entire listing of status for all the records. I am trying to retrieve only the status for the record I've selected from the SP list. I'm not well versed in Infopath so I'm not sure what the best approach would be.
  • 06-29-2012 04:10 PM In reply to

    Re: Retrieve rule returning the same value from SP list field

    I understand better now.

    So, what version of SharePoint are you using? If you are using 2010, and IP 2010, you'll have query fields in your data connection you can leverage. Otherwise, you'll need to add a filter to your XPath to select the correct Status out of the whole list that is returned in your data connection. Basically, you need a way to connect the Status with the form - does this list contain the form name or some other unique identifier?

    Hilary Stoupa

  • 07-02-2012 07:42 AM In reply to

    Re: Retrieve rule returning the same value from SP list field

    I am using SP2010 and IP 2007. 

    I spoke with the admin and we decided to set the status flag in the form (your first suggestions) to allow us to change views as needed.  That seems to be working.  A SP workflow is being designed to allow the form to be moved, once it is completed, to another form library to prevent additional editing of the form. 

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