Solved

Extracting text from a lookup field in a SharePoint 2013 workflow

Posted on 2014-01-14
8
12,338 Views
Last Modified: 2016-04-04
Drawing a blank here...the overall project is a bit complex so I figured I would simplify things...

I have a custom list with a column that has a look-up field.  I need to populate what is chosen there to populate another column in that same list.

So for example, I have a pull-down list called "Sandwich" and "Big-Mac" is chosen it would populate a  "Sandwich Text" field.

Other info.
I'm a SharePoint consultant and the farm is a Dev so I can I have all of tools available to me, SharePoint Designer 2013, Visual Studio, etc.  :)
This would need to go into a workflow or into Visual Studio solution that I will deploy.
Eventually, this will be used to create an item in another list and populate "Big-Mac" in a column on that list but didn't want to confuse things here ;p

Thanks!
-Scott
0
Comment
Question by:k94ss01
  • 4
  • 3
8 Comments
 
LVL 50

Expert Comment

by:teylyn
Comment Utility
Hello,

If this were a choice column, you could use a calculated column to pull the text into another field. But that does not work with a lookup column.

The choice column scenario is like this:

One column is called "Sandwich Text". You want to populate that column with the value chosen in another field, which is a Choice column called "Sandwich".  So you make the "Sandwich Text" column a calculated column and set it to the "Sandwich" column.

screenshot 1
Then you create a new item in the list, select a value in the "Sandwich" column and save. The "Sandwich Text" column will display just that value.

screenshot 2
But if the "Sandwich" is a lookup field to another list in the Sharepoint site, this will not work, since lookup columns cannot be used in calculated columns.

So, as an alternative to a calculated column you may want to use a workflow to update the "Sandwich Text" column.

Give me a moment while I fire up SharePoint Designer 2013. I'll report back.

cheers, teylyn
0
 
LVL 50

Accepted Solution

by:
teylyn earned 250 total points
Comment Utility
So, if you want to pull the value of a Lookup column into another field, you can do this with a SharePoint workflow.

In my example, I have created a list with lookup values and then linked the new column "SandwichLookup" to that list. I want to grab the value of that column and put it into a text column called "SandwichLookupText"

To do this, I fired up SharePoint Designer 2013 and created a  workflow that fires when an item is created or changed. The workflow steps are outlined in this screenshot:

workflow steps
When I go and edit a list item in the Sandwich list, the workflow will kick in and copy the value from the lookup column "SandwichLookup" to the text field "SandwichLookupText"

result of the workflow
cheers, teylyn
0
 
LVL 50

Expert Comment

by:teylyn
Comment Utility
Hello, why the B grade? What would you have expected for an A grade? What extra effort do you need to put in to make this work?
0
 

Author Comment

by:k94ss01
Comment Utility
Sorry, I meant an A!  I got it mixed up with the other question I asked!
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:k94ss01
Comment Utility
Is there a way to change it?
0
 
LVL 50

Expert Comment

by:teylyn
Comment Utility
I'll get the mods to change it.
0
 

Author Comment

by:k94ss01
Comment Utility
Thanks,

I had another InfoPath issue and didn't know I could only have two open so I hurried up and closed them.  If you know anything about the following http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_28385997.html I would be eternally grateful!!!!!
0
 

Expert Comment

by:Cmclean67
Comment Utility
Hi, I tried this solution, but received a suspended workflow message.  I am using SP 2013.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

If you create your solutions on SharePoint sooner or later you will come upon a request to set  permissions of the item depending on some of the item's meta-data - the author, people assigned as approvers, divisions, categories etc. The most natu…
Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
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…

762 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