Use Calculated Columns to Close Technical Gaps in SPD Workflows

Here’s another article I wrote for www.sharepointbriefing.com.  This one describes a technique that we can in SharePoint Designer to perform calculations that aren’t possible using any of the built-in calculation-style activities.  The basic idea is to use a custom list as a calculation engine – define a list that performs the calculation correctly, create an item via SPD and then read the result.

Here’s a teaser:

image

Read more about it here: http://sharepointbriefing.com/features/article.php/3866646/Use-Calculated-Columns-to-Close-Gaps-in-Workflows.htm

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

3 thoughts on “Use Calculated Columns to Close Technical Gaps in SPD Workflows

  1. Jim Adcock

    Not having read the full post yet, it sounds from your description above that you are suggesting different lists for different calculations.

    Instead (and I fully realize you might be suggesting this in your post), you can have one list for all calculations. Need a new kind of calculation? Add some more columns. And of course, you can keep control of the list by using the workflow to delet list items as soon as the calculations for a particular workflow have been completed.

    Reply
  2. Jim Adcock

    The only problem I see with this implementation is the assumption that the ID of the copied item is the ID of the item you are copying +1 (on a very busy list this could cause problems).

    There is a workaround that will fire the events needed to update the calculated column. A second workflow, this one on the WF Calculated Field list. Add column(s) to the calculated list, an ExternalID and perhaps a ListName. Then have the workflow add the ID of the item the workflow is attached to and the name of the list where it resides to the Calculated list item. After creating the list item to do the calculation, set the workflow to wait until field change (CalcReceiver to hold the calculated value).

    Set a WF on the Calculated list to, on create, find the item (in the correct list using conditional branches and ListName) using the ExternalID, and update the CalcReceiver field with the calculated data.

    Then either WF would then delete the Calculated list item.

    Running the secondary workflow populates the calculated value, and you are sure you will always refer to the correct list item.

    (the comment submission on the site with the full post doesn’t like my name….)

    Reply
  3. Pingback: Use Calculated Columns to Close Technical Gaps in SPD Workflows – Another Solution « Working It Out

Leave a Reply to Jim Adcock Cancel reply

Your email address will not be published. Required fields are marked *