Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a SharePoint 2007 document library of Word and Excel documents with several approval workflows associated with it. My question is whether it is possible at all to know whether it was the list item that was modified, or the document? I thought that the Version property could be used, but unfortunately this does not differentiate what was modified (list item fields or document).

share|improve this question
    
Are you asking if it is possible inside a Nintex Workflow? Or just possible at all (like with a WF workflow)? –  spdevsolutions Mar 28 '12 at 23:35
    
Thank you. Preferably I'd like to know if it is as simple as checking a property from within a Nintex workflow, yes. But I'm starting to think that it may not possible at all in Sharepoint. If you have any ideas of any other method at all, that'd be great, thanks. –  Felix Mar 29 '12 at 0:39
    
Per the FAQ we do not accept questions about commercial, third-party products. However, it looks like this question could easily be rephrased to not be Nintex specific. @Felix, can you rephrase? –  Kit Menke Mar 29 '12 at 13:39
    
Thank you, Kit. I have just removed "Nintex" from the original question. Hope that satisfies the requirements/ –  Felix Mar 29 '12 at 22:34

3 Answers 3

You can compare the beforeProperties to the afterProperties with an EventReceiver: http://www.sharepointalex.co.uk/index.php/2010/06/beforepropertiesafterproperties-in-event-receivers-i-always-forget-this/

It looks like on a Library they actually work for ItemUpdated, so you could potentially use the EventReceiver to start your workflow or whatever...

share|improve this answer

Programmatically, or in the workflow?

In the workflow I don't think it makes a difference if the item or the file was modified, they both fire the "Start when item is modified" trigger.

In code, you might have a new SPFile.Version if the document itself was modified, you could check that. For sure you would see the differences in an EventReceiver, as it has both before and after properties. So as a possible work around you could fire your workflow from there (or work out a nice interface where you can hook workflows on those more specific triggers)

share|improve this answer
    
Thanks Louis. I was hoping there was a property I could check within the Nintex workflow. Could not find any obvious item properties with it. Yes, the workflow fires whenever the item or file is modified, but I was hoping that conditional branching within the workflow would be possible dependent on what was modified. –  Felix Mar 29 '12 at 0:43
    
Nintex has an impressive set of activity extensions, you might be able to fetch versions with one of the custom activities.. But it's been a while since I worked with it. –  Louis Mar 29 '12 at 1:00

You can create a extra column to store the hash of the document. You can compare the hash of document when the item is modified to the previous value using an event receiver.

If both the hash don't mach, the document is modified for sure. ( Note: The hash will change even if you insert a space in document)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.