?
Solved

Wokring a calculated field in SharePoint

Posted on 2011-03-23
7
Medium Priority
?
498 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 2000 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

765 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