Solved

Wokring a calculated field in SharePoint

Posted on 2011-03-23
7
486 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

I used to be SharePoint evangelist in our company, so my Outlook always full of questions about how to do this, or where I can find that. One day I found such an email with the following question: "how to attach 3-State workflow (one of the workflow…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 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

12 Experts available now in Live!

Get 1:1 Help Now