Setting a field based on a response in a previously submitted form? - InfoPath Dev
in

InfoPath Dev

Setting a field based on a response in a previously submitted form?

Last post 03-26-2015 05:27 AM by Shmul. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-25-2015 10:10 AM

    • Nwrann
    • Not Ranked
    • Joined on 03-25-2015
    • Posts 2

    Setting a field based on a response in a previously submitted form?

    Is it possible to automatically set a field in the "current form" based on a field's value in the previously submitted form?

    My goal is to get submitted infopath forms to Auto-Assign based on who the previous form was assigned to.

     Here's the workflow.

    1) FIRST FORM is submitted and the "Assigned to" field is populated with Jane Smith.

    2) SECOND FORM is submitted and upon submission a data query of FIRST FORM is conducted and identifies that FIRST FORM was assigned to Jane Smith. SECOND FORM sets the "Assigned To" field's value with John Doe.

    3) THIRD FORM is submitted and upon submission a data query of SECOND FORM is conducted and identifies that SECOND FORM was assigned to John Doe. THIRD FORM sets the "Assigned To" field's value with Jennifer Johnson

    4) FOURTH FORM is submitted and upon submission a data query of THIRD FORM is conducted and identifies that THIRD FORM was assigned to Jennifer Johnson. FOURTH FORM sets the "Assigned To" field's value with Jane Smith.

    and the cycle continues between the three people assigned to the forms.

    Is this possible?

    I can use Nintex Workflow if necessary.

     

  • 03-25-2015 11:00 PM In reply to

    • Shmul
    • Not Ranked
    • Joined on 03-25-2015
    • Posts 7

    Re: Setting a field based on a response in a previously submitted form?

    Hi Nwrann,

    if this forms are created one after another, than you could just query list items with your form and take the one with max ID. It will be the previous form. For the forth form just use max ID-3.

    Hope it helps

  • 03-26-2015 05:15 AM In reply to

    • Nwrann
    • Not Ranked
    • Joined on 03-25-2015
    • Posts 2

    Re: Setting a field based on a response in a previously submitted form?

    Thanks Shmul,

    A follow up question though, where do I specify in the query process to take the one with the max ID?

    There's no option in the Data Connection.

    The Query action only has 2 fields (Action, Data Connection)

    The Conditions in the rule don't allow for "If (max)ID Assigned To  ="

    I can Set A Field's value with the Max ID using a filter, but that's not what I want to do.

     

    I'm not sure where I would use the max ID function in order to query for the assigned to information of that specific previously submitted item. Any help is greatly appreciated.

  • 03-26-2015 05:27 AM In reply to

    • Shmul
    • Not Ranked
    • Joined on 03-25-2015
    • Posts 7

    Re: Setting a field based on a response in a previously submitted form?

    Hi Nwrann,

    you can set up a rule, when the form is loaded with actions: 

    1) set a field value -> field: switch to the data connection to your list (create one, if you don't have it) -> query fields -> ID; value: add a funktion max of the field -> switch to the data connection to your list -> data fields -> ID

    2) query this data connection.

    So you will have information (in data fields for this connection) from the form with max ID.

    Hope it helps.

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