locked
IP repeating section for DateTime and creating multiple SP Calendar items? RRS feed

  • Question

  • I'm trying to build a InfoPath form/SPD workflow solution that creates items in a SP Calendar based upon info submitted in a InfoPath forms library.  I've done this before where the workflow was triggered upon item create/update for the form library and then used Create List Item or Update List Item to add/edit an item in the calendar.  That was easy enough using property promotion for start and end time fields of type DateTime in the InfoPath form and then initializing the calendar item's start and end time to the values that had been promoted from InfoPath.

    What I'd like to do this time around though is offer users the ability to create/update a variable number of items in a SP Calendar based upon the submittal of a single InfoPath form. 

    Adding a repeating section to the InfoPath template that allows users to enter a variable number of start and end time sets was easy.  I then used the double eval trick to concat all start times into a string field that gets promoted, doing likewise for the end times.  One of the problems with this approach though is that everything is now of type string and the SP Calendar start and end time must be of type DateTime; so the SPD Workflow approach seems to have hit a wall.

    Can the variable number of calendar items be created/updated from within the InfoPath template?  Is there another approach, besides event handlers or a custom .NET form, that I'm missing?  Of course, if this can be done in a SPD Workflow that'd be great!

    Opinions and suggestions will be appreciated as always.

    Tuesday, April 26, 2011 8:47 PM

All replies

  • Hi Carl,

    Have a look at the article on following post.

    http://blogs.msdn.com/b/infopath/archive/2007/03/26/submitting-to-a-sharepoint-list.aspx

    It basically shows how to submit data to sharepoint list. Perhaps, you can submit your data directly to the calendar list and create variable number of items instead of using a workflow. If that doesn't work, you can still submit the data to a custom list. You can create a "Calendar View" if you have 2 date fields.

    Here another article you can check out. It shows how to submit data from repeating table to a sharepoint list, but you'll need to include a piece of code to the form.

    http://www.bizsupportonline.net/infopath2007/how-to-submit-items-rows-repeating-table-infopath-sharepoint-list.htm

     

    Hope that helps...

     


    Pman
    http://www.pmansLab.com/
    Wednesday, April 27, 2011 12:58 AM
  • Thanks Pman, the users want to connect this calendar info to Outlook so it'll need to be stored in a SP Calendar web part somehow.  I also started playing around with the merge function in InfoPath for a repeating field/section.  It looks like it'll eliminate some of the needs for the double eval trick; which is great.

    To clarify, here's the high-level view of the process being created here.  Filling out the request using IP 2010 is okay, but we're running MOSS 2007.

    1. User submits a request to host an event.  A single request can cover 1+ dates and requires a 2-stage approval.
    2. The level-1 approver is matched up to a value the user selected in the form.  The level-2 approver is static.  The approval workflow should function like a state machine, rather than a strict sequential workflow.
    3. Once approved, each date requested from the form is added into a SP Calendar so that the Cal can be connected to Outlook.  Also, each resulting calendar item will contain the other information entered by the user in the request; as well as a link to the request.

    My thoughts jumped to InfoPath for creating this request form since it would allow for the repeating section (1+ date request requirement) and easy layout/styling controls.

    It sounds like if the request can be submitted to the form library and also create a item in a custom list for every set in the repeating section that the rest of this might just work.

    Thanks again for the suggestions.  I'll let everyone know if this works out or not.

    Monday, May 2, 2011 8:57 PM
  • This is EXACTLY what I'm trying to do.

    I'm doing something similar for leave request forms that allows the user to enter multiple dates and times using a repeating table.  I am also looking to be able to pull these dates from the repeating table and placing them on an SP calendar.  I was also planning on doing a the approval process similar in that when it is approved, they would be added to the calendar.

    Did the answers given work for you? 

    Friday, May 27, 2011 1:27 PM
  • Unfortunately I got pulled in many other directions the last few weeks, so I haven't been able to test this approach out.  I'll repost once I do.  ...and if it works, I'll include any additional notes I think willl help others.

     

    Friday, May 27, 2011 3:29 PM
  • Hi, 

    I  have exactly the similar requirement, does anyone able to make this work?

    Thanks


    Bhandhavi Manda

    Wednesday, July 25, 2012 9:04 PM