Solved

Wokring a calculated field in SharePoint

Posted on 2011-03-23
7
492 Views
Last Modified: 2012-05-11
I have a sharepoint list that needs to do some notifications and trying to figure out how best to do it.

The list will have a bunch of fields but lets say that field Color drives field Contact

part 1 of Question: Contact is a calculated field, how does the caluculation look for the following logic:
- if color=blue then contact=blow, joe
  if color=red then contact=red, sally
  if color=grean the contact=green, george

once if have the calculated filed right is there a way to notify that user that someone selected them?
0
Comment
Question by:Matt Pinkston
  • 3
  • 2
  • 2
7 Comments
 
LVL 15

Expert Comment

by:sharepointguru14
ID: 35204023
you would need either an event receiver or workflow. You would be able to send an alert OOTB if you used a people picker but since the contact is a calculated field you will have to do a workflow that is kicked off when item added (or maybe changed) that really does the logic for you, you wouldn't even need the calculated contact column unless you are using it for something else.
0
 

Author Comment

by:Matt Pinkston
ID: 35205414
how about the first part to the question?

part 1 of Question: Contact is a calculated field, how does the caluculation look for the following logic:
  if color=blue then contact=blow, joe
  if color=red then contact=red, sally
  if color=grean the contact=green, george
0
 
LVL 15

Expert Comment

by:sharepointguru14
ID: 35207067
I'm saying you would do that through a workflow. In the workflow designer you would be able to select when this field = this....set this field to that.

I don't see the point in just doing a calculated field as that isn't going to be able to give you the alert you are looking for anyway
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 8

Expert Comment

by:nsyyoung
ID: 35208940
Use sharepoint designer to build a simple workflow:

Step 1
--compare fields: if color field = "blue", action: set contact field = "blow, joe"
else if color = "red", action: set contact field = "red, sally"
Step 2 or maybe second wf to fire on change/new item
--comparefields: if contact = "blow, joe", action: send email "blow, joe"
else if contact = "red, sally", action: send email to "red, sally"

That's off the top of my head.  You may have more wf configuration to work out, but the wf designer in SPD should guide you through it.
0
 

Author Comment

by:Matt Pinkston
ID: 35214640
just wondering why this could not be done in just a calculated field?
0
 
LVL 8

Expert Comment

by:nsyyoung
ID: 35215446
You maybe can do the calculation, but how are you going to notify the single affected person without sending a list alert to everyone without a workflow?  
0
 
LVL 15

Accepted Solution

by:
sharepointguru14 earned 500 total points
ID: 35215896
It can be done in a calculated field but the calculated field would result in a txt name and cannot kick off an alert. So you would then need to create the workflow to look  at that calc field, translate the name into a person and then send the alert. So it is easier and cleaner for you to just do it with a workflow and if you still want the field for display purposes that is fine the workflow can calculate and populate it for you and it can even make it a person field rather than a calculated field so that you can use other options like filtering with [ME] and stuff like that. None of that will work if you just do a calc column
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now