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

How to Auto Populate Text Box controls with Look Up column value Selection

Jump to solution

Hi All, I am new to Nintex . We designed a SharePoint list and we are planning to use Nintex Form as UI for this list. User Selects one of the value in list Look Up column (which is populated out from the another Master List.) On the same Nintex Form we have some another editable Text Box Controls which we want to Auto Populate using the Master List column values or erase the content from Text boxes based on the selected value. Ex: Select Existing Employee Id in the Look up column then Populate First Name, Middle Name, Last Name. If User selects "New" then just clear the above 3 columns. Its an Urgent requirement any help will be highly appreciated here.

Labels: (1)
0 Kudos
Reply
6 Replies
jesse_mchargue
Nintex Employee
Nintex Employee

Re: How to Auto Populate Text Box controls with Look Up column value Selection

Jump to solution

@anilk - 

 

You can accomplish this using a calculated value control setting each control by leveraging the runtime function lookup() in your formula. If the First Name, Middle Name, and Last Name are all in the Master List, it would look something like this:

First Name control: lookup(“Master List”, “ListColumn_Employee Id”, FormControl_Employee Id, “First Name”)

 

The lookup function is broken down like so:

  • "Master List" - list you are looking up the data from
  • "ListColumn_Employee Id" - list column to filter on
  • FormControl_Employee Id - value to filter on
  • "First Name" - list column to return

 

You would also need to connect the calculated value controls back to a SharePoint list column if you wish to commit the data to SharePoint.

 

Hope this helps!

0 Kudos
Reply
anilk
Nintex Newbie

Re: How to Auto Populate Text Box controls with Look Up column value Selection

Jump to solution

Jesse,

Quick question.

The First Name, Middle Name, Last Name columns need to be editable in this form. If i use Calculated Fields i will not be able to edit them , correct ?

Based on SharePoint List column design as Single Line Text i got the TextBox for these 3 columns. Can i repalce these 3 column controls with new Nintex Controls ? Nintex form can store those controls data into my sharepoint list after Save button click?

 

In my scenario if user wants to use the existing Employee then he/she will select the Lookup value else in lookup "Please Select a Value..." option will get used. 

 

on the Lookup i am little bit confused on what values i need to set here.

  • "Master List" - list you are looking up the data from - I think in mycase can i say "Employee Master" ?
  • "ListColumn_Employee Id" - list column to filter on - In my case on Employee Id look up column control settings saying ID Connected To prperty as "EmployeeID", i need to use this name or Cline Side Javascript Name? 
  • FormControl_Employee Id - value to filter on - This value is decided at runtime based on selection, how i need to set or use this value? 
  • "First Name" - list column to return - Its the column name in Master List , correct ?

 

If possible can you please provide some screenshots for these 4 values? 

If i need to populate 3 value then i need to use 3 Calcualted fields  and look ups ?

 

0 Kudos
Reply
jesse_mchargue
Nintex Employee
Nintex Employee

Re: How to Auto Populate Text Box controls with Look Up column value Selection

Jump to solution

@anilk -

 

You are correct, Caclulated value controls would not be editable. If you want allow edits, you can use a text control and use rules to set the value of the control. If you simply want to display the data, a calculated value control can do it.

 

I made a post on how you can set this up easily within Office 365 using a responsive form. The same approach can be used for SharePoint onprem as well as Classic forms. Here is a link to the blog:  How To: Auto Populate Form Controls in SharePoint Online with Nintex 

 

Let me know if this helps or if you need more clarification.

 

Thanks

 

View solution in original post

0 Kudos
Reply
anilk
Nintex Newbie

Re: How to Auto Populate Text Box controls with Look Up column value Selection

Jump to solution

Hi Jesse,

The Link you provided is so useful but a few more inputs needed

 

1. If User Selects a value for the Employee Id then Popualte the First,Middle, Last Name and make the controls Readonly (because we don't want user to mess up the Master data) and if User wants to create a new employee form then Make these textboxes editable  (User will not select value for the  Employee I mean the field will show "Please select a value.." . How can we achieve this ? 

 

2. If Controls are Enabled False - Will it be possible to save data back to SharePoint List columns?

 

0 Kudos
Reply
jesse_mchargue
Nintex Employee
Nintex Employee

Re: How to Auto Populate Text Box controls with Look Up column value Selection

Jump to solution

@anilk - 

 

I would design the form to have different sections (panels) that are shown or hidden based on a choice control on the form. Perhaps a choice control that has "New Employee" and "Existing Employee". If the end user selects "New Employee", the required controls are shown to them (no employee ID dropdown or lookup data), but if they select "Existing Employee" they have to make a selection from the dropdown and the lookups will then happen.

 

Also, yes, you are correct. If a control is "Enabled" is "No" then the data within the control is not committed back to SharePoint. This is something where a Calculated Value control is effective as you can connect the control to a list column. The Calculated Value control will only perform the formula that is provided, when designed to. So you could have it only trigger when certain conditions occur ("Existing Employee" for example).

 

Hope this helps!

0 Kudos
Reply
anilk
Nintex Newbie

Re: How to Auto Populate Text Box controls with Look Up column value Selection

Jump to solution

Hi Jesse,

Thanks for your input. We want to use Classic Form in Ninext Forms 2013.

 

can you please provide me an example on how to use 2 panels and hide based on Choice control option "New" "Existing"  and also the Rules you added to the controls in Classic Form? In Classic Form Rules there is no logic to add with "when" and "then" ...

 

Both the panel controls connect to the same List columns? Because In list we have Employee Id (can be blank for new employees), First , Middle, Last Names and here we are designing to set of controls for the same columns.

 

Is it possible to show all these 4 controls on same location in UI based on choice option? and also

If user select "Existing" optin and switch to "New" we need to clear the existing panel controls data and use new controls values to store in the lsit. Vice versa.

0 Kudos
Reply