cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
thzu
Nintex Newbie

Is it possible to update an item with a lookup column?

Jump to solution

Hi.

I use SharePoint 2013 with Nintex. I created a workflow in Nintex and the workflow errors because it cannot update an item.

The item I want to update has a lookup column. (Lookup title from the same list where multiple values are possible --> is this the problem?). Is this possible in general?

Thank you!

0 Kudos
Reply
9 Replies
bstori
Nintex Newbie

Re: Is it possible to update an item with a lookup column?

Jump to solution

Yes, you need to use the ID to do your lookups and not the text value.

Reply
thzu
Nintex Newbie

Re: Is it possible to update an item with a lookup column?

Jump to solution

Hi - I just tried it and its working. But when people fill out the 'New Item' form they need to see the title at the lookup.. they probably don't know the ID of every singe item in the list. Any ideas for a workaround?

0 Kudos
Reply
thzu
Nintex Newbie

Re: Is it possible to update an item with a lookup column?

Jump to solution

And it still doesn't work with multiple values - at least in my case.. :/

0 Kudos
Reply
bstori
Nintex Newbie

Re: Is it possible to update an item with a lookup column?

Jump to solution

When you create your Lookup Column in SharePoint it should show the Text Value of the look up and this is the same for Nintex Forms. In the forms Designer, if you select your lookup control,  and in the settings make sure the ID is connected to the Column Name of the text you want to show up. The IDs are just used in your workflows, and the text values should show up in your drop down. All lookup columns have 2 parts, the value (which is your ID) and the Display (which is your Text), so when creating your Lookup Column Select the List to get information from, and then select the Title, or whatever text value you want to show in your drop down. It will ways create the relationship with the ID in the background.

In your workflow you will need to do a

1 )Query List Action to get the ID of what was selected in the drop down.

2) Then you will want to do another Query List Action to get a collection of Titles that you want to update.

3) Then loop through your Title Collection and do your Update Action.

      a) Within your update action what ever column is your look up column update with the ID you got form your 1st Query               List Action.

I hope this helps.

Reply
jackgelo
Nintex Newbie

Re: Is it possible to update an item with a lookup column?

Jump to solution

Hi,

if you need to update a lookup field with multiple values, you have to set them as the following way:

ID1;#;#ID2;#;#ID3 

so you have to build a string with all the id of the element you want to connect separated by ;#;# 

Using that syntax you should be able to update a lookup field with multiple values.

Giacomo

Reply
Not applicable

Re: Is it possible to update an item with a lookup column?

Jump to solution

Hi, ‌! Did you arrive at a solution? If so, can you select one of the replies above as a "correct answer" by clicking that button in the reply? It's helpful to others who search for answers to questions like yours.

Thanks!

Frank

Your community manager

0 Kudos
Reply
thzu
Nintex Newbie

Re: Is it possible to update an item with a lookup column?

Jump to solution

Hi Ben!
Sorry for the late response, I had to do some other sharepoint stuff but now I am back to this issue.
I am not using Nintex forms.. just Nintex workflows. For the forms (eg. Edit Form) I use the code in SharePoint designer.

So I have to choose if the lookup should be ID or title.

I tried it with IDs and multiple values and it works now. So my next step is to change the view to title. Do you know if I can do this via code?

If I want to solve this in the workflow I still have the problem with updating a lookup column (which just works with IDs not with title - is that right?)

Thanks!

0 Kudos
Reply
thzu
Nintex Newbie

Re: Is it possible to update an item with a lookup column?

Jump to solution

I just tried to change it via code and I think its not possible, because the code doesn't change when changing the column (edit column --> in this column: title (linked to item) or ID)

Reply
thzu
Nintex Newbie

Re: Is it possible to update an item with a lookup column?

Jump to solution

Okay I got a solution: with the ;#;# hint (from Giacomo Gelosi Champion  comment) I was able to update the lookup columns with IDs.

Then I created a new column (lookup: title and show ID in another column) and I am hiding the ID columns in the Edit/New/Display form and in my view.

So the person who fills out the forms just sees the title in the lookup and the rest is happening in the background (hided columns and workflow that synchronizes the columns all the time). Maybe not the prettiest solution but it works..

0 Kudos
Reply