Solved

Wokring a calculated field in SharePoint

Posted on 2011-03-23
7
495 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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…
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

856 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