Retrieve from Sharepoint not working - InfoPath Dev
in

InfoPath Dev

Retrieve from Sharepoint not working

Last post 05-26-2009 11:36 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-25-2009 07:43 PM

    Retrieve from Sharepoint not working

    Hi all,

    I have a data connection set up that queries a Sharepoint form library and returns the ID field.

    In Infopath, I have set up a field to contain max(@ID) +1
    This worked fine until I reached ID 190, now this is the only ID that the data connection returns.

    The form uses this field as the file name.

    This means all new forms created have a filename of 191.

    I have checked the list, and there are definitely 191 entries. The latest ID was 191.
    I then tried uploading a document to take the place of 192.
    It is in the list, but Infopath still says Max(@ID) +1 results in 191.

    Any ideas why the data connection is failing?

    Oh, I have created a different form, just for the purpose of testing the data connection, and the new form also picks up 190 as the highest ID in the list.

  • 05-26-2009 11:36 PM In reply to

    Re: Retrieve from Sharepoint not working

    Hi GreenAnt,

    Are you sure you are checking the default view in the SharePoint list?

    Anyway, this is not a good way to increment the value because it depends on the default view which doesn't necessarily have all items in it and it doesn't protect against two simultaneous submitters getting the same value. You should submit the form and then query to get the ID and add it to the form and submit again. That's a bit of a hack (since you have a dual submit), but it's an easy way to do what you want without this issue.

    Best of luck!

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.