cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
randy826
Nintex Newbie

Created recurring calendar event with workflow 'call web service' does not recurr

Jump to solution

Our organization uses a SharePoint 2010 calendar for booking conference rooms with VTC capability.

When a VTC event is created in the calendar, I need to create an event for the prior half-hour to allow for setting up the VTC.  So, for a VTC starting at 0900, an VTC Setup event needs to be created from 0830-0859.

So far, this works fine unless the VTC is recurring (which, of course, most of them are).  The VTC setup event is created, but it is not recurring. 

My method is to query the VTC event using Query List Item to get the data such as title, location, recurrence data, start/end times, etc.  Then I calculate the Setup event start and end times, and use a Call Web Service to create the new Setup event. 

When I view All Events in the calendar, I see the new Setup event with the Recurrence symbol.  When I open the event in display, Recurrence shows a '1'.  When I edit the Setup event, recurrence expands and shows the pattern that I selected for the VTC. However, there is no start date in the Recurrence date range, although the event itself shows the proper start time. The Setup event shows only on the first day, and not on other events.

Below is the XML used to create the event:

<Batch OnError="Continue" ListVersion="1">
        <Method ID="1" Cmd="New">
            <Field Name='ID'>New</Field>
            <Field Name="Category">VTC Setup</Field>
            <Field Name="Title">VTC Setup-18-2</Field>
            <Field Name="Location">9</Field>
            <Field Name="Facilities">1;#Basement Rm B:15</Field>
            <Field Name="Reference">279</Field>
            <Field Name="TimeZone">0</Field>
            <Field Name="EventDate">2018-01-03T06:30:00Z</Field>
            <Field Name="EndDate">2018-01-03T06:59:00Z</Field>
            <Field Name="Description"></Field>
            <Field Name="fAllDayEvent">0</Field>
            <Field Name="EventType">1</Field>
            <Field Name="fRecurrence">1</Field>
            <Field Name="RecurrenceData"><![CDATA[<recurrence><rule><firstDayOfWeek>su</
firstDayOfWeek><repeat><monthly monthFrequency="1" day="3" /></repeat><repeatForever>FALSE</
repeatForever></rule></recurrence>]]></Field>

        </Method>
    </Batch>

I pull the RecurrenceData string right from the VTC event, and enclose it in the !CDATA structure.

The XML is created with a Build String as such:

<Batch OnError="Continue" ListVersion="1">
    <Method ID="1" Cmd="New">
        <Field Name='ID'>New</Field>
        <Field Name="Category">VTC Setup</Field>
        <Field Name="Title">VTC Setup-{ItemProperty:Title}</Field>
        <Field Name="Location">{ItemProperty:Location}</Field>
        <Field Name="Facilities">{WorkflowVariable:varFacilityLkup}</Field>
        <Field Name="Reference">{ItemProperty:ID}</Field>
        <Field Name="TimeZone">0</Field>
     <Field Name="EventDate">fn-FormatDate({WorkflowVariable:varSetupStartTime},"s")Z</Field>
        <Field Name="EndDate">fn-FormatDate({WorkflowVariable:varSetupEndTime},"s")Z</Field>
        <Field Name="Description">{ItemPropertySmiley Very Happyescription}</Field>
        <Field Name="fAllDayEvent">0</Field>
        <Field Name="EventType">1</Field>
        <Field Name="fRecurrence">1</Field>
        <Field Name="RecurrenceData"><![CDATA[{WorkflowVariable:varQOutputMulti}]]></Field>
    </Method>
</Batch>

Does anyone know what might be happening? Am I missing a field? There are more issues besides this one.  For example, if I click on the Setup event in the All Items view, it opens, but if I click on the Setup in the calendar view, I receive "The item does not exist" error.

Any assistance would be appreciated.  I've looked at all the information I can find on creating recurring events with Nintex, but none of them have fully answered my issues.

0 Kudos
Reply
2 Replies
emha
Nintex Newbie

Re: Created recurring calendar event with workflow 'call web service' does not recurr

Jump to solution

you need to supply value of item GUID as well.

something like

<Field Name="UID">{fn-NewGuid()}</Field>

EndDate should as well be from a (far) future. this way it will create just one recurred instance.

you should take end date from main event  and just change time to finish shortly before main event.

0 Kudos
Reply
randy826
Nintex Newbie

Re: Created recurring calendar event with workflow 'call web service' does not recurr

Jump to solution

Thank you, this gave me the information I needed to get the recurrence to work.  I had to do this:

fn-Substring(fn-FormatDate({ItemProperty:EndDate},"s"),0,11)fn-Substring({WorkflowVariable:varSetupEndISO},11,9)

Since the EndDate item property had the correct year, I used Substring of the EndDate formatted as ISO, then concatenated that to the end time for the VTC Setup event (also in ISO format).  This gave me the proper string to use in my XML for the setup event end time!

Reply