2 Issues:: Multiple Form Users & Live Data Feed // Overwrite Existing List Item - InfoPath Dev
in

InfoPath Dev

2 Issues:: Multiple Form Users & Live Data Feed // Overwrite Existing List Item

Last post 07-30-2009 11:22 AM by warrtalon. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-28-2009 09:36 AM

    2 Issues:: Multiple Form Users & Live Data Feed // Overwrite Existing List Item

    Hello,

     I've been searching the net for a non-programmatic solution to a few road-blocks I've encountered but to no avail. For specs, I'm working with SharePoint Designer 20007 and InfoPath 2007. Below are my issues:

    1. I've built out a form to where its secondary data source is a SharePoint list that feeds the data. Within the form itself, there is a 'Complaint ID' drop-down field that will only prefill the form from rows in the SP list in which a Review Date field is blank. Since there will be 2 users working in this form, I'm trying to figure out a way in which if one user has selected a Complaint ID from the drop-down menu, the other user will not be able to prefill their form with that same Complaint ID - can this even be accomplished in Infopath, being all data is already sent from the SP List to the form initially?

    2. This maybe better suited for a SharePoint only site, but since my issue dealt with InfoPath integration as well I thought I would post here. I've successfully created a Workflow in SharePoint Designer to where, when a new item in the SharePoint Library is created (which is linked to the aforementioned InfoPath form) then that new item will also be created in a SharePoint List; however, I'm needing a way to have it Overwrite a list item baseed off of the Complaint ID in the form - I've tried using Update List Item action in a new Workflow in SP Designer,  but it does not overwrite the record. Is there any known issues for this? Or is there a way to force this overwrite procedure in Infopath without the use of code?

     Any help is appreciated on this, thank you!

    P

  • 07-30-2009 10:46 AM In reply to

    Re: 2 Issues:: Multiple Form Users & Live Data Feed // Overwrite Existing List Item

    Hi --

    I can't think of a way to handle #1, since, as you mention, the data for that dropdown is probably loaded when the form opens. Are other items filled out before the complaint ID is selected? Because you could maybe delay retreiving that data, to give a better chance of not getting two people selecting the same one. What populates the Review Date in the list? If it is something that is done from the form, perhaps you could have that happen earlier in the process, like when the user selects a complaint ID.... of course, that gets tricky, too, 'cause you have to consider what happens when the user changes his or her mind -- you'd have to reset that Reiveiw Date back to blank in the list and then update a different one.

    As to #2, I haven't used Workflows much.... but what happens when you try update list item? You say it doesn't overwrite -- does it create a new list item? Are you adding a condition where the complaint id in the list = the complaint id from the form?

    Hilary Stoupa

  • 07-30-2009 11:22 AM In reply to

    Re: 2 Issues:: Multiple Form Users & Live Data Feed // Overwrite Existing List Item

    For #1, I don't understand the problem nor the scenario.  Explain what you mean by 2 users working in this form.  Only one user can work on the form at a time, so any changes made by user 1 would be reflected in the form when opened by user 2.  if you're talking about them creating separate forms, then whatever logic you're using to limit the rows of data based on complaint ID, you'd use that same logic to restrict what is seen by user 2 when creating a new form after user 1.  If they both create a new form at the same time, you will not be able to cross-reference anything, because until the data is submitted back to SharePoint, there is no way for the form to be aware of what the other user is doing.

    For #2, you wouldn't overwrite, but rather update an existing list item with the new information, and that would require matching a primary key of some sort.  You would set this key when creating the list item with the initial workflow - that key would be some unique identifier in both the form and the list item.  You'd later reference this key for updating the specific list item relevant to the changed form.  If you truly want to overwrite - meaning get rid of the previous record and make a new one - then you would first delete the relevant record and then create a new one.  Either option should work, but I figure the "update list item" is the better option.

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