Data Connection did NOT update for 2 IP form threading - InfoPath Dev
in

InfoPath Dev

Data Connection did NOT update for 2 IP form threading

Last post 03-23-2015 06:36 PM by ilee1. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-17-2015 08:17 AM

    • ilee1
    • Not Ranked
    • Joined on 10-12-2008
    • Posts 5

    Data Connection did NOT update for 2 IP form threading

    Hi, I have struggled with this for days and appreciate if someone can help me.... Two different users (user A and user B) are opening the same IP form and fill it up. Data connection has pulled the same field called: 'NextID' from SharePoint list, say 'NextID' = 5 User A has 'NextID' = 5 and User B has same value too. User A submits the form earlier than User B. Right after User A submitted, 'NextID' has changed to 6 (or plus 1, according to business logic). 'NextID' is meant for running number. As User B has opened the form 'before' User A submits, therefore when User B submits, his form still shows 'NextID' = 5. Rightfully it's supposed to be 6. Meaning data connection is supposed to refresh or update by getting the latest value, which is 6 in this case. 'NextID' value is stored in SharePoint list and data connection gets from the SharePoint list. What is the best method to get the information refreshed in data connection?
    Filed under: ,
  • 03-20-2015 02:43 PM In reply to

    Re: Data Connection did NOT update for 2 IP form threading

    Hello ilee1,

    It sounds like this data connection is queried on first load, instead of on submit. What you'll want to do is either submit the form on load and then query to get the next id, or on submit query to get the same number.

    In the scenario you are describing, user A and B could open the forms at different times, but if user A does not submit before user B opens the form, they will have the same NextId number.

    Let me know if you get stuck!
    Bre

    Bre Huston | Project Manager

    Qdabra® Software / InfoPathDev.com / FormsQuo

    Business Process Automation for Everyone – Streamline data gathering to turn process into knowledge.™

     

  • 03-23-2015 06:36 PM In reply to

    • ilee1
    • Not Ranked
    • Joined on 10-12-2008
    • Posts 5

    Re: Data Connection did NOT update for 2 IP form threading

    Thanks for your response, Bre. I found another way which is to use max(ID) + 1 Actually my intention is to get the latest running number in the system. At my previous post I was using old method, using SharePoint list to contain the running number and IP form will obtain the running number upon clicking a button. the details of using 'max(ID) + 1' in Data Connection is as such: - 'Submit Data' - To a doc library on a SharePoint site - File Name is max(ID) + 1 Now i have another problem, which is to 'save draft' which allows users to save form. It is NOT 'Save As', but 'SAVE' and will issue new running number. SAVE will assign a new running number, shall update SharePoint list and shall allow users to come back again to update/save form as many times as they want, before finally submit. The running number shall remain the same. Here is the logic for 'SAVE': if (new form) then running number = max(ID) + 1 else if (existing saved form) then running number = existing running number I don't seem to be able to get the running number working. Tried this but fail: http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=144
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.