SharePoint Products TechCenter >
SharePoint Products and Technologies Forums
>
SharePoint - Workflow
>
SPD workflow not updating items for all users
SPD workflow not updating items for all users
- WSS 3, SPD 2007. I created a workflow for a calendar item that executes on change and on new. Steps 1, 2, 3, and 4 work properly. Step 4 checks if approval status equals pending, and if so it sends an email to the creators' supervisor and then stops workflow. Step 5 checks if the approval status equals Approved, if so it sets 'Event Category' to 'PTO Approved' then stops workflow.
The supervisor who approved the event can view the event and see that the workflow updated the item properly. HOWEVER, the user who created the event see's the 'Event Status' is still showing 'PTO Request'. Same item viewed by different people show differently. The workflow history for both users show that proper workflow comments...
I'm banging my head over this one...why why why is this happening?- Moved byMike Walsh MVPMVP, ModeratorTuesday, November 03, 2009 7:01 AMwf q (From:SharePoint - Development and Programming)
Answers
- I decided to look at the db and found that two records exist.
Obviously, one of the details of my workflow which I thought was not pertinant, actually is. My workflow includes a copy action I got from CodePlex. The actions are:
> If Approval Status equals Approved
> Set Event Category to PTO Approved
Then Copy item in PTO Calendar to list at http://server/OfficeCalendar, Do not Overwrite existing items. Store resulting list item id in Variable: NewItemID
Then set Variable PTO Approved to PTO Approved
Then Update item in OfficeCalendar (which finds the item using the NewItemID and changes the Event Category to 'PTO Approved'.)
Then Stop Workflow and log 'Event Category set to 'PTO Aproved'.
Then Delete item in 'PTO Calendar'
The Delete action is usually before the stop workflow action. I'd rather not delete the item in the PTO Calendar, but because the item is not displaying correctly once it's approved I decided to delete it.
The copy action is from the ilovesharepoint from codeplex . I can only assume that the action is duplicating the record for different permissions. Interestingly, though, is that when I have Delete action included it deletes the duplicated record as well (or the item is duplicated, if it exists, after the workflow stops).
I suspect some one will want to tell me to check with the developer of that action, which I will, but if you are the developer or are familiar with the action and you have some insight, please share it.
Thank you.- Marked As Answer byc_manboy Wednesday, November 04, 2009 9:28 PM
All Replies
- Hello,
What does the item display for a user other than the two you specified? Were you running a test of this workflow when this happened? I have seen it where a page refresh is needed to view the change.
Chris Caravajal MCTS SharePoint Help - I've refreshed the page. I've closed IE and repopened it. I've even tried logging on different computers and it still shows the same.
I'm using Wilsons Color Coded Calendar which creates a column called Event Category. For my events I hid that field and defaulted the value to 'PTO Request'. Then, when the supervisor approves the item the workflow that runs changes that fields value to 'PTO Approved' and then stops per the SPD activity Stop Workflow. the stop workflow activity logs 'Supervisor approved PTO. Workflow is stopping.'.
When the user who created the event views that calendar the event's field 'Event Category' shows 'PTO Request' but when the supervisor reviews the event they see 'PTO Approved.' Looking at the workflow history they both will see that the workflow ran twice successfully (once when it was created and a second time when the supervisor approved it).
What I dont understand is how two people can review the same record and see different field values.
edit: I just reread your question, Chris, and realize I misunderstood. I will have to check to see what another user sees and will repost. - Yeah, that sounds like a caching issue. They can't see different data on the same record unless there is content approval turned on, and the new record is still in draft, in which case the other user would see the previous major version only.
SharePoint Architect || My Blog - I tested this again:
The user who created the event and other users who share the same permission level see Event Category: 'PTO Request' , Approval Status: 'Approved'.
I, and other users who share my permission level of Full Control, see the item Event Category: 'PTO Approved' , Approval Status: 'Pending'. (in this new test I noticed that the approval status is also displaying incorrectly).
The workflow is triggered by updated items so it auto runs when someone with approve permissions approves the event, which is what I am doing. Why would the approval status show approved for lower level users and pending for upper level users?? It's all backwards.
Content approval is turned on, and this feature seems to work as desired. i.e., the created by user can see the item while in draft mode but other users who share same permissions cannot. Once the item is approved, other users can see the item. Users sharing my permission level can see draft items which is why they can see it.
I ran ipconfig /flushdns as well as deleted temp files and cookies from browser. So unless i'm not clearing the cache correctly I do not believe that is the issue. - Isn't that the expected behavior? It will not show the new Event Category status until it is approved. Until that point in time, regular users only see the value that was set as of the last appoval. They shouldn't see the "draft" data while it is pending. What do you expect to see?
SharePoint Architect || My Blog - I decided to look at the db and found that two records exist.
Obviously, one of the details of my workflow which I thought was not pertinant, actually is. My workflow includes a copy action I got from CodePlex. The actions are:
> If Approval Status equals Approved
> Set Event Category to PTO Approved
Then Copy item in PTO Calendar to list at http://server/OfficeCalendar, Do not Overwrite existing items. Store resulting list item id in Variable: NewItemID
Then set Variable PTO Approved to PTO Approved
Then Update item in OfficeCalendar (which finds the item using the NewItemID and changes the Event Category to 'PTO Approved'.)
Then Stop Workflow and log 'Event Category set to 'PTO Aproved'.
Then Delete item in 'PTO Calendar'
The Delete action is usually before the stop workflow action. I'd rather not delete the item in the PTO Calendar, but because the item is not displaying correctly once it's approved I decided to delete it.
The copy action is from the ilovesharepoint from codeplex . I can only assume that the action is duplicating the record for different permissions. Interestingly, though, is that when I have Delete action included it deletes the duplicated record as well (or the item is duplicated, if it exists, after the workflow stops).
I suspect some one will want to tell me to check with the developer of that action, which I will, but if you are the developer or are familiar with the action and you have some insight, please share it.
Thank you.- Marked As Answer byc_manboy Wednesday, November 04, 2009 9:28 PM

