Create multiple list items from single form Submit - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Create multiple list items from single form Submit

Last post 02-11-2016 02:05 PM by Hilary Stoupa. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 01-26-2016 07:54 AM

    Create multiple list items from single form Submit

    Is there a way within InfoPath to have it create multiple SharePoint list items from a single form?

     By default, if I create a form from a list, and then put a submit button on that form and tell it to submit via the main data connection... it will create a new item the first time you hit that submit button.   Any subsequent submits will basically update or save information in that list item which was initially created.

    Most of the time this is exactly what I need it to do.

     But, I've now hit a situation where I'd like to open the form, have the user make some choices from x different fields, and then on submit,  write x different list entries. Each entry will have a lot of common data between them, but one or two fields will get changed per each submit.

    I don't see a way to say "don't just update the first list item you created, make another new list item"

     How would one trigger this sort of thing from within InfoPath? 

  • 01-29-2016 03:26 PM In reply to

    Re: Create multiple list items from single form Submit

     I'm not sure what you can with an existing list - but if you create a new list starting with the SharePoint List template in InfoPath, you have an option to manage multiple list items with a single form....


    Hilary Stoupa

  • 02-08-2016 12:09 PM In reply to

    Re: Create multiple list items from single form Submit

     I'll have to study this. I never start with InfoPath when building stuff, so this is foreign to the way I'm used to doing things.

    On first glance, it looks like it starts throwing in repeating sections....which might mean I can go back into my original and play with repeating sections there (which is something else I never do :) )

     

    Thanks 

  • 02-09-2016 11:50 AM In reply to

    Re: Create multiple list items from single form Submit

     I've started playing with the "manage multiple items" form option...but having trouble wrapping my brain around how to make it do what I need it to do.

    In simple terms, the repeating sections let you set up some fields like so:

    HEADING 1 

    • Record ID 01 - not displayed
    • Set Field 1 Value 1 (chosen from dropdown with filter a+b+c)
    • Set Field 2 Value 1
    • Set Field 3 Value 1

      and then you have the control that users must say "insert another" which will expose the opportunity to display an identical

    HEADING 1 

    • Record ID 02 = not displayed
    • Set Field 1 Value 2 (chosen from dropdown with filter a+b+c)
    • Set Field 2 Value 2
    • Set Field 3 Value 2 

    and so on...

    With what I'm doing... I need to have these sections exposed from the start (no insert command), so I know I have like 5 records this thing can touch at once  (btw...I'm only using this for initial input...not for future editing).  I also am changing the filter on one of the dropdowns for each of the sections.

     So...exposed on form open I'd have sections like such

    HEADING 1 

    • Record ID 01 - not displayed
    • Set Field 1 Value 1 (chosen from dropdown with filter a+b+c)
    • Set Field 2 Value 1
    • Set Field 3 Value 1

    HEADING 2 

    • Record ID 02 = not displayed
    • Set Field 1 Value 2 (chosen from dropdown with filter Z-X)
    • Set Field 2 Value 2
    • Set Field 3 Value 2 

    HEADING 3 

    • Record ID 03 = not displayed
    • Set Field 1 Value 3 (chosen from dropdown with filter c*5)
    • Set Field 2 Value 3
    • Set Field 3 Value 3 



  • 02-09-2016 12:01 PM In reply to

    Re: Create multiple list items from single form Submit

     I may be able to cheat this a bit by forcing the user to pick the filter values.... which would then allow me to have the repeating sections say

     

    HEADING 

    • Record ID 01 - not displayed
    • Set Field 2 Value 1
    • Set Field 3 Value 1
    • Set Field 1 Value 1 (chosen from dropdown with filter Field 2 Value 1 + Field 3 Value 1)

    But I'd still rather have a number of these all exposed at once, instead of the user having to hit the insert function on the section

  • 02-09-2016 03:02 PM In reply to

    Re: Create multiple list items from single form Submit

    In "normal" InfoPath forms, you can set defaults to have multiple instances of a repeating node when the form opens. I'm not sure about a SharePoint List form that is set to manage multiple items - maybe check the Data tab on the Ribbon and look for the defaults? Attaching a screenshot from a non-list form.
    Hilary Stoupa

  • 02-11-2016 01:11 PM In reply to

    Re: Create multiple list items from single form Submit

     Playing with it a bit more.. I can make 4 or more instances of the section appear by default on form load.

    Now I just need to keep playing to see how much I can tweak each instance.  It's tricky since in design view...you don't see 4 exposed copies of the section...just the one

  • 02-11-2016 02:05 PM In reply to

    Re: Create multiple list items from single form Submit

    Right - in the default data you can set hard coded values in the different field instances, but can't use formulas....
    Hilary Stoupa

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