cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

How to set a lookup control in a Nintex Form, either with Powershell or with a Nintex Workflow?

Hi Nintex Community,

I have a question about the use of Nintex Forms with a List Lookup Control and Powershell.

Situation: The Form has a LLC that is connected to a text field. The control is connected to a list and filtered with a named control. This is working perfect. When I choose something from the dropdown, it is perfectly saved in the column. And I can filter on it with views, or group by or ... And the form looks good.

I need now to migrate another list to this list. With PowerShell I map the correct columns. When I run the script, the text field is populated with the correct text. I can see the field in every view, and grouping/fitering  etc is also working.

But...

... when I open the form, the field is empty ( or in Edit Mode "Select a value").

or

When I change something else, and save, the field in the views in SP list is still correct with the value that was put in with PowerShell (so also the filtering).

So this value is saved, probably in a hidden field?

Question:   How can I fill in with Powershell this value (SP Text column), so that is appears also in the Nintex Form in the Lookup Control?

Any ideas?

Greets,

Peter

Labels: (2)
Tags (1)
0 Kudos
Reply
4 Replies
Workflow Hero

Re: How to set a powershell lookup control

Hi,

I did some testing with a Nintex Workflow for filling up the text field, same result.

Greets,

Peter

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How to set a lookup control in a Nintex Form, either with Powershell or with a Nintex Workflow?

Hey Peter De Meester‌,

I just had a look on it and ran into the same problem. But I found out, that it works if you do not store the text but the ID of the element you looked up. I connected my Nintex Forms Lookup Control to the title column of the list and stored the ID of the looked up element in it. When I know create new elements via PowerShell or via Quick Edit and afterwards open the element in the Nintex Form the Lookup Control is filled as desired.

So I would suggest that you store the ID instead of the text and then change your PowerShell Script in the way that it writes the ID in your text colum. To also get the actual text you wanted to migrate, you can maybe enhance the PowerShell Script to store this values into another column or you just set up a Nintex Workflow for that.

Best regards,

Jan

Accept as Solution Reply
Workflow Hero

Re: How to set a lookup control in a Nintex Form, either with Powershell or with a Nintex Workflow?

Hi Jan,

Thank you for this very clear explanation.

I'm going to try this with our setup. I'll keep you updated.

Greets,

Peter

Accept as Solution Reply
Workflow Hero

Re: How to set a lookup control in a Nintex Form, either with Powershell or with a Nintex Workflow?

Hi Peter,

Lookup value is stored in the below format:

<<Lookup List Item ID>>;#<<Lookup List Item Title>>;#<<Lookup List Item ID>>;#<<Lookup List Item Title>>

Example: 32;#School;#38;#Office;#40;#Home

To update a Lookup value either pass the Lookup List Item ID OR pass the string in above format.

0 Kudos
Accept as Solution Reply