Set Lookup Column from Single Line Column in Workflow

  • 28 February 2017
  • 8 replies
  • 15 views

Badge +3

I have tried almost every variation of integer and string variables and list lookups I could think of to simply copy the "Name" column over to the Lookup column... all of which seem to return coercion error.

Is there a simple way to achieve this?


8 replies

Userlevel 5
Badge +14

to set a value of lookup column, you have to set it to a valid  ID of item from remote list it points to.

so eg. in your example where you tried to set it to "1;#Title", there should have been just "1"

as per copying Name column to lookup column, as far as I can see you have there a decimal number -this will definitely not work since item ID is always integer.

finally, are you sure your JobNumberLookup is lookup column?

if it were, designer would not allow you to input any other value but integer, so definitely not anything like "1;#Title"

Badge +3

The "Name" column is the value I want to copy over to the lookup in this workflow (This is being created by another workflow).

Once the name is populated, I want the lookup to use the same value and populate all of the additional information from the lookups. The value created in the "Name" column is created from another list, the exact same list the JobNumberLookUp site column is using.

This also does not work.

Userlevel 5
Badge +14

you should have it configured like this:

source = name of list where JobNumberLookup fetches data from

field = ID

when = name of the column from source list where JobNumberLookup fetches data from

equals = List lookup

         Source = current item

         field = Name  (ie. column where you copy data from)

Badge +3

Can you elaborate a little more on that. I am even using create item in another site to post the ID and trying to use that to populate the lookup, clearly doesnt work.

Have tried everything i can think of; none of these work.

Userlevel 5
Badge +14

not sure how/what should I explain more. I have listed field by filed what to configure where

you should get something like this. just make sure you correctly fill in Source and When fields - they has to follow JobNumberLookup configureation from list column

Badge +3

I went back and looked at this again and tried to create the same action in the image. However, my source list is on a parent site and I cannot select it.

Userlevel 3
Badge +9

You can use Query List to query the ID of the item in the parent list.  You'll have to use the CAML editor to set it up to query the parent site.  This post  will give you an idea how to do that.  Once you have your ID, you should be able to update the field on your list. 

Badge +3

Thanks,

I marked the answer correct and forgot to mention that I went to the source list where the initial workflow creates the item and set the lookup value inside that workflow instead of the receiving library's workflow. It worked great.

Reply