biancaschutz
Design Dabbler

Update sharepoint calendar item when separate list item is changed

Jump to solution

I have a list 'assess form' based on the information in that I have a super simple workflow to create a sharepoint calendar event.

How do I modify my workflow so that it will either update the calendar event IF the event fields change OR delete the old item and create a new one? (my preference would be to update the original if possible)

I am a fairly basic and beginner user so detailed explanations or screenshots would be insanely appreciated!

 

Thank you!!

Capture.PNG

0 Kudos
Reply
10 Replies
SimonMuntz
Nintex Employee
Nintex Employee

Re: Update sharepoint calendar item when separate list item is changed

Jump to solution
Hi,

Its hard to give advice without knowing all the intricacies but in general I would leave your current workflow to run on item creation and have a second workflow that runs when the item is modified.

One thing to add on the first workflow is to retreive the item id of the item that is created. The create item action has this built in (Store new item ID in) so just capture the ID in a variable and then update your list with the ID. Create a column just for this if you have to.

When the item is modified use the ID in the list to update the related event and just update all columns so that you dont have to worry about working out what was changed.
0 Kudos
Reply
biancaschutz
Design Dabbler

Re: Update sharepoint calendar item when separate list item is changed

Jump to solution
Hi Simon, thanks for replying, appreciate the help.

I’m a real beginner user, how do I capture the ID in a variable?

I know it’s probably really simple but google isn’t helping much on this topic
0 Kudos
Reply
SimonMuntz
Nintex Employee
Nintex Employee

Re: Update sharepoint calendar item when separate list item is changed

Jump to solution

Hi,

In the Create Item action select Variables.

Variables.png

Click New:

NewVar.png

Select List item ID, give it a name, and click save.

CreateVar.png

Now use the variable in the Create item action in the "Store new item ID in" Field.

UseVar.png

When the new item is created the action will store the item id of the new item.

You can update your list item with this ID. When you need to update the Calendar item you can reference this ID to make sure you are updating the correct item.

0 Kudos
Reply
biancaschutz
Design Dabbler

Re: Update sharepoint calendar item when separate list item is changed

Jump to solution
oh, I unknowingly did that already when I set up my create item.

Do I put the update item in the same workflow before the create item?

Do I have to set up a query list to search if that item id is used then update if it is and create if it's not?

Your help is greatly appreciated!
0 Kudos
Reply
SimonMuntz
Nintex Employee
Nintex Employee

Re: Update sharepoint calendar item when separate list item is changed

Jump to solution
Hi,

First workflow (Starts on item creation):
Create Item action that creates the item on the calendar.
Update item action to save the item ID in a sharepoint column in the source list of the item that was just created in the calendar.

Second Workflow (Starts on item Modfication):
Update item action. It updates the calendar item where the Item ID is equal to the id that was stored in the column in the first workflow.
This makes sure that the correct item is updated. No query list required as the update Item action will lookup the correct ID.
0 Kudos
Reply
biancaschutz
Design Dabbler

Re: Update sharepoint calendar item when separate list item is changed

Jump to solution

Capture.PNGThanks so much for that, so where it has update I have 'engineering services site visits' this is the calendar I want the entry updated in. The 'where' field I'm a little unsure of? Is the above correct to update my calendar entry? I can't see a field 'list item ID' which is what I named my variable in the create item workflow?

0 Kudos
Reply
SimonMuntz
Nintex Employee
Nintex Employee

Re: Update sharepoint calendar item when separate list item is changed

Jump to solution

Hi,

Your action for the second workflow would look like this.

I did this in SharePoint 2010 as based on your screen shot it looks like what you are using.

CalendarUpdate.png

0 Kudos
Reply
biancaschutz
Design Dabbler

Re: Update sharepoint calendar item when separate list item is changed

Jump to solution
Hi Simon,

I think I missed a step, 'the column where I stored the item ID from the first workflow'? I created the variable but I don't think it's linked to a column.

When I select 'current item' - 'ID' it moves a calendar entry to the date I specify but it's not the right calendar entry? it's a random one out of the calendar? So clearly I have done the IDStore wrong?
0 Kudos
Reply
biancaschutz
Design Dabbler

Re: Update sharepoint calendar item when separate list item is changed

Jump to solution

Capture.PNG

 

This is what my create item looks like?

 

0 Kudos
Reply