Logo 
Search:

MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

WorkFlow: current item vs. payload

  Asked By: Ashish    Date: Jun 03    Category: MOSS    Views: 1052

With WFs on a custom list in MOSS using SPD I am trying to keep a
current & prior value of a field so I can have a trigger condition
of "on field #1 change", the base trigger of course is "on change."

So is my "payload" only the field that changed, the whole new row,
several of whose fields could have changed?

And in the same regard, what is my "current item", the whole new
row, the old row?

And what do I update so that prior value = current value after I've
detected that in fact, my field #1 has changed?

Of course, none of this is the "real work", it's just detecting and
re-setting the trigger for the next time around.

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Dante Parsons     Answered On: Jun 03

I'm not familiar with the "payload" term in this context, but the Current
Item is the list item  that has changed; it includes all fields. In
addition, you can update  a field  in the item that has changed... however,
this kicks off another change  event which starts another instance of the
workflow, etc.

 
Answer #2    Answered By: Rafael Willis     Answered On: Jun 03

"Payload" is a term used by David Mann in "WF in the 2007 Micro Off Sys." It
refers to the list item  that the WF is acting upon.

More importantly, you said that if I update  a field  in current  item, this also
will constitute a change  to the list  & thus my WF executes again. Uggg, but on
the 2nd pass the field will not qualify as "changed" since they are now equal,
correct?

Is this the normal way to do this, 2 passes of a WF?

 
Answer #3    Answered By: Daniella Landry     Answered On: Jun 03

Here's how I do this in workflows all the time:

Example: I want to know when the Author's name changes, so I create
another (hidden) field  called "Copy of Author".
When the item  is created, configure the workflow  to copy the contents of
the "Author" field to the "Copy of author" field.

Then, each time  an item is changed, configure the workflow to check if
Author is not equal to Copy of Author.
If the fields  are different, then take whatever action, like sending an
email or whatever, and then the next step is to copy the Author field to
the "Copy of Author" again.

Yes, this change  will elicit the "Change" workflow again, but this time
it will see that Author and Copy of Author are equal, and it won't do
anything. The only bad thing about this is that the version history
shows all of this, and it might confuse end users who don't know what
"Copy of author" is.

 
Didn't find what you were looking for? Find more on WorkFlow: current item vs. payload Or get search suggestion and latest updates.




Tagged: