1

Being not the most technically ept developer (I'm learning as I go) I'm stuck with a question I've been asked to find a solution for in regards to Sharepoint 2010 and list data.

Situation: Each day we are adding 70+ items to a list. Each item needs to be individually reviewed and then 'assigned' to a 'Region' based on where the requester is located. What we want to do is to upload the 70+ jobs into a list, then edit the records to a 'Region' which in turn populates an email to the relevant area notifying them a new/changed item has been added to the list.

For the benefit of this question I was using three fields: AMER, APAC, EMEA

Currently tested:
So far I have a basic workflow that checks to see if the 'Region' field is empty and then waits. Once we then change the region via edit item the workflow sends an email to the region in question to notify them new work has been added and then stops. I added the stop to prevent any more emails being sent when other fields for a given item is changed (I only want the email to send once the region field has been changed, not each time the list data is changed)

Adding any more workflow checks in for the other regions (APAC, EMEA) does not send the email I've setup. AMER is the only workflow that seems to work flawlessly.

My Question: Is it possible to :
a) Create a workflow that only picks up changes to the 'Region' field and then emails out accordingly
b) The workflow email contains a list of newly added/changed items (rather than doing it on a singular basis, it would email anything with the region APAC to the people in APAC)

If I'm unable to do any of the above, can someone help me to find a solution? (Preferabbly in lamen's terms so I can understand it)

As always thanks for any assistance guys!

4
  • Blake, what is your non-SharePoint technical level? Commented Jul 10, 2013 at 15:32
  • I'm curious - why does the workflow check "Region" and then wait? Why not have it just run every time an item is added or updated? Also, is this a SharePoint Designer or Visual Studio workflow?
    – LFurness
    Commented Jul 10, 2013 at 16:04
  • @ Robert - I'm pretty good with most IT stuff, but if I work in support as opposed to development, this is a side line hobby of mine my Boss has decided to leverage. Commented Jul 11, 2013 at 13:57
  • @LCountee - I don't want it to run each time as when we first place the newest list items in the region is blank. We then have to go through these to decide which region it is. What we wanted to avoid was an email to say new items had been added, then another one to say the region has been set, then another one to say they had updated their list item. We can see list updates from a master view that someone will manage on a day to day scenario. What this solution is trying to achieve is to make sure the right teams know they have new items to update. Commented Jul 11, 2013 at 13:59

1 Answer 1

0

You need your workflow to run un add and change events of the items. That is the way it works. Your need to add a new field (lets call it "stage") to maintain your internal state of proccessing. So each time the item is changed you check the content of your "stage" field and take corresponding action. Some cases:

  • if "Region" = "" and "Stage" == "" -> this is a new item -> do ... nothing?
  • if "Region" != "" and "Stage" == "" -> this region is filled but no mail was send -> send email and update "Stage" = "Email done"

About your email problem: Did you setup alerts? If so this might be the problem. Let your workflow send your email (your habe to build your email body in a variable). The other option is to rely on email alerts and configure them to execute on change and if they match an view. You need 3 views. The view must be configured to filter to "Stage" = "" and Region = "EMEA" (change depeding on view for the other regions).

A possible solution on the other hand would be to run your logic inside of an powershell that executes every 5 or 60 minutes. Your could send your email and no nasty workflow would be needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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