Solved

Extracting text from a lookup field in a SharePoint 2013 workflow

Posted on 2014-01-14
8
12,826 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:Ingeborg Hawighorst
ID: 39781582
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:
Ingeborg Hawighorst earned 250 total points
ID: 39781644
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:Ingeborg Hawighorst
ID: 39921703
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
ID: 39921718
Sorry, I meant an A!  I got it mixed up with the other question I asked!
0
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.

 

Author Comment

by:k94ss01
ID: 39921722
Is there a way to change it?
0
 
LVL 50

Expert Comment

by:Ingeborg Hawighorst
ID: 39922070
I'll get the mods to change it.
0
 

Author Comment

by:k94ss01
ID: 39922077
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
ID: 41534401
Hi, I tried this solution, but received a suspended workflow message.  I am using SP 2013.
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

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

920 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

17 Experts available now in Live!

Get 1:1 Help Now