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.
... when I open the form, the field is empty ( or in Edit Mode "Select a value").
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?
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.
Thank you for this very clear explanation.
I'm going to try this with our setup. I'll keep you updated.
Lookup value is stored in the below format:
<<Lookup List Item ID>>;#<<Lookup List Item Title>>;#<<Lookup List Item ID>>;#<<Lookup List Item Title>>
To update a Lookup value either pass the Lookup List Item ID OR pass the string in above format.