Unable to insert multiple records from a web-enabled InfoPath form displayed in a SharePoint Web Part - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Unable to insert multiple records from a web-enabled InfoPath form displayed in a SharePoint Web Part

Last post 02-06-2013 07:54 AM by Hilary Stoupa. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 01-31-2013 11:37 AM

    • sbmdb
    • Not Ranked
    • Joined on 01-31-2013
    • Posts 8

    Unable to insert multiple records from a web-enabled InfoPath form displayed in a SharePoint Web Part

    Hello,

    I extensively utilize much of the information on this site in order to enhance my InfoPath (etc) development skills; I appreciate the responses and contributions of everyone because they are extremely helpful. I have an issue, for which I cannot seem to find a solution, despite hours of searching.

    We have a large communal display in which we would like to display "alerts".  The Alerts are controlled using SharePoint; a Library in which each record is an Alert.  We have another mechanism that will interrogate this SharePoint Library to show the Alerts on the display.  Furthermore, one data attribute (Location - the location to which the Alert pertains) needs to be filtered.  For example, if your location was "Kitchen", you shouldn't be able to select "Toilet" as that particular seat belongs to the "Washroom".  Seems pretty simple (and it is), but what I am struggling with is the interface.

    I started with a Custom SharePoint List.  I then customized the form using InfoPath.  Then I decided to create a "management" page for the end-users which would display the currently active Alerts for your area, allow you to close Alerts (e.g. conclude the record's lifecycle), and allow you to raise new Alerts.  This management page is Web Part page that is saved within a Wiki Library.  This Wiki Library has an additional column "Area" which will allow me to make a managemet page pertain to a certain area/location only (e.g. Kitchen/Washroom example above).

    The management page contains the following:

    1. A Web Part that contains the Alerts List.  This displays the active alerts only.  
    2. A Web Part that displays the InfoPath edit form.
    3. A Web Part that displays the InfoPath insert form.
    4. A Page Field Filter Web Part.  This allows me to specify to which area the page pertains and have that info available to SharePoint/InfoPath.

    The InfoPath form is only one form with multiple views. The Web Parts work together thusly:

    • Web Part (4) sends the area data to Web Part (1).  Using that data, we filter by location.  This ensures that the list only displays active alerts for that area
    • Web Part (1) sends a row of data to Web Part (2).  This allows users to click on the list (1) and have the details of that record appear in Web Part (2), which they can then edit
    • Web Part (4) also sends the area data to Web Part (3).  This allows InfoPath to be aware of which area we’re in so we can filter the location values in the form

    The specific problem I am having is that within Web Part (3), the idea is to be able to raise an Alert, have it submitted, and then clear the form to be able to enter another Alert.  When I attempt to submit/insert multiple entries, InfoPath displays a generic error: “The form cannot be submitted.  There has been an error while processing the form.”  I have checked the log entry and it does not tell me specifically why it is failing, however, I suspect that I am not correctly clearing the data before submitting. 

    I have tried the following strategies with no success:

    • Manually clearing every field
    • The “New record” button
    • Re-querying the query fields with dummy data

    I am looking for information on how to solve the above issue, and perhaps some comments/advice/best practices regarding the approach taken.

    Sorry about the length of my post…

     

    --sbmdb

     

    -- sbmdb
  • 02-04-2013 08:52 AM In reply to

    Re: Unable to insert multiple records from a web-enabled InfoPath form displayed in a SharePoint Web Part

    So - it works when you are not submitting / inserting multiple entries? That is, the web parts work together as you anticipate when working with a single entry?
    Hilary Stoupa

  • 02-04-2013 10:52 AM In reply to

    • sbmdb
    • Not Ranked
    • Joined on 01-31-2013
    • Posts 8

    Re: Unable to insert multiple records from a web-enabled InfoPath form displayed in a SharePoint Web Part

    Thanks for responding Hilary!

    Hilary Stoupa:
    So - it works when you are not submitting / inserting multiple entries? That is, the web parts work together as you anticipate when working with a single entry?
     

    That is correct.  If I want to raise one new Alert, everything works fine.  If I raise an Alert (works fine), and then raise another one directly after, it gives the aforementioned error.

    -- sbmdb
  • 02-04-2013 11:02 AM In reply to

    Re: Unable to insert multiple records from a web-enabled InfoPath form displayed in a SharePoint Web Part

    Okay - so what are you doing to manually clear the form? I agree with you - it sounds like your logic error is in there somewhere. Are you displaying all fields on the form for testing purposes so you can ensure you know what is cleared and what the current values are? You can always clean it up later, after you figure out what's wrong.

    Hilary Stoupa

  • 02-04-2013 11:27 AM In reply to

    • sbmdb
    • Not Ranked
    • Joined on 01-31-2013
    • Posts 8

    Re: Unable to insert multiple records from a web-enabled InfoPath form displayed in a SharePoint Web Part

    Hilary Stoupa:

    so what are you doing to manually clear the form?

     

    Well I've tried a few things:

    • Manually clearing every field
      • Created a button that set's each field to ""
      • Tried various combinations of clearing the Query/Data fields
      • Some fields are grouped such as "user" fields; I've tried to clear each sub-field, as well as the whole thing
    • The “New record” button
      • Added a button to the form, within the button's properties, General | Button | Action, choose "New Record"
      • I thought that this button action was supposed to perform exactly what I wanted, but it does not seem to work
    • Re-querying the query fields with dummy data
      • I read an article which stated that one could clear the (Data) fields on a form by using a "dummy" query
      • Created a button that would (1) set the query field (e.g. id = 0, a non-existent record), (2) retrieve data; the fields do clear, however, the same error ensues

    Hilary Stoupa:

    Are you displaying all fields on the form for testing purposes so you can ensure you know what is cleared and what the current values are? You can always clean it up later, after you figure out what's wrong.

    Yes I am doing this; I have both the Query and Data fields displayed.  When I am attempting to clear/resubmit, the fields seem to be clearing as I would expect, however, I must be missing something because it does not work...

     

    -- sbmdb
  • 02-05-2013 10:03 AM In reply to

    Re: Unable to insert multiple records from a web-enabled InfoPath form displayed in a SharePoint Web Part

    How annoying. When you say you checked the log entry, you are referring to the SharePoint log files, not the event viewer? Sometimes they have more info on what is going wrong...
    Hilary Stoupa

  • 02-06-2013 05:12 AM In reply to

    • sbmdb
    • Not Ranked
    • Joined on 01-31-2013
    • Posts 8

    Re: Unable to insert multiple records from a web-enabled InfoPath form displayed in a SharePoint Web Part

    I have checked both the logs (which are set to Verbose for InfoPath Services!) and Event Viewer; however, they both contained the same generic error text (extremely frustrating as you can imagine). 

    However, I have found a workaround that I will detail in the following post.

    -- sbmdb
  • 02-06-2013 05:22 AM In reply to

    • sbmdb
    • Not Ranked
    • Joined on 01-31-2013
    • Posts 8

    Re: Unable to insert multiple records from a web-enabled InfoPath form displayed in a SharePoint Web Part

    I was having the following issue with my InfoPath/SharePoint solution: 

    sbmdb:

    The specific problem I am having is that within Web Part (3), the idea is to be able to raise an Alert, have it submitted, and then clear the form to be able to enter another Alert.  When I attempt to submit/insert multiple entries, InfoPath displays a generic error: “The form cannot be submitted.  There has been an error while processing the form.” 

    Although I was unable to solve the specific issue, I was able to reformat my page(s) to formulate a workaround. 

    I had two InfoPath Form Web Parts on the page: one for editing existing Alerts, and one for raising new Alerts.  I created an additional Web Part page in which I placed a single InfoPath Form Web Part that only displays the (view for the) new Alerts submission.  In my original page, I've removed the corresponding Form Web Part and added a Content Editor Web Part that contains a link that opens the new page in a new popup window.  Since I can control the appearance/behaviour of the popup (via the link in the Content Editor Web Part), the users can close Alerts using the original Form Web Part, but create new Alerts by clicking the link, which in turn opens (popup) the new page, which will only contain the InfoPath form for new Alerts.

     

    -- sbmdb
  • 02-06-2013 07:54 AM In reply to

    Re: Unable to insert multiple records from a web-enabled InfoPath form displayed in a SharePoint Web Part

    Thanks for updating - sorry you had to set up a workaround. Kind of a baffling error scenario!
    Hilary Stoupa

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