cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Auto-populate form field based on data in list

I have a Nintex form that I use for people to enter information weekly.  The information they fill out in the form is stored in a list when the form is submitted (saved).  I would like to have a button in the form called "auto populate" so when the user clicks the button the data for each column from last weeks entry will auto-populate into the corresponding form fields.  Then the user can edit the entries and save the new form for the new week ending. 

 

When the user submits the form each week he/she picks a week ending date so each "item" or "row" in the list corresponds to a week.  The way I did this in InfoPath was I had the user select from a drop down in the form which week ending entry he/she wanted to copy the data from and when they selected the week ending the fields would auto-populate the form.

 

So far I can't figure out how to do that in my Nintex form and it is causing a lot of issues with the users.  Any ideas would be greatly appreciated.

Labels: (2)
0 Kudos
Reply
7 Replies
waltont
Nintex Newbie

Re: Auto-populate form field based on data in list

I have a similiar need for this, but is there a way to automate this without the need of a button click? I just want the data to auto populate when a dropdown menu of list items is selected. They need to auto populate into a text box and not a calculated field (which is not editable as far as I know).

Reply
chrissnc
Nintex Newbie

Re: Auto-populate form field based on data in list

I also need to do this.  I was thinking of using a series of calculated lookups in the form which seems like a lot of effort.   I know people do this using javascript.but I would love to see a non javascript solution.

0 Kudos
Reply
Not applicable

Re: Auto-populate form field based on data in list

Hi,

See if this post helps How to query a SharePoint list from another list in Nintex Forms for O365.  You should be able to lookup to the same list using the current user, and get the item and populate accordingly.

Let me know if you need help with that.

0 Kudos
Reply
chrissnc
Nintex Newbie

Re: Auto-populate form field based on data in list

Hi Stephen I could use some formatting help on this if you have time.   I am using nintex forms 2013 and I have a list lookup called temp that pulls information from a column named Template name on the list called CMLTemplate.  I want the ability to autopopulate my list fields when someone chooses a template name from the drop down name on the list lookup called temp.

List lookup settings:

name temp

ID connected to temp

client ID javascript variable name temp

On the CMLTemplate list I have the following field:

Meeting title

on the form I want to map this into the following field:

Name Meetingtitle

Connected to Meeting title

I have loaded the following into setting-> custom javascript on my form:

nintex..jpg

I have tried both spellings of Meeting title as well as a few other tweaks.   I think I am missing something really simple here.   I can pull the information on my calculated lookups without issue.

thanks,

Chris

0 Kudos
Reply
waltont
Nintex Newbie

Re: Auto-populate form field based on data in list

Since your "meeting title" column has a space, try 'Meeting_x0020_title'

0 Kudos
Reply
chrissnc
Nintex Newbie

Re: Auto-populate form field based on data in list

no dice

0 Kudos
Reply
waltont
Nintex Newbie

Re: Auto-populate form field based on data in list

Ok so this next thing we can try is going to be a lot more complicated. I hope you're good with API and XML lookups...this should help you obtain the actual name of the column as stored by sharepoint.

Your objective will be to obtain the <dSmiley FrustratedtaticName></dSmiley FrustratedtaticName> node in the XML. You'll need to build the below URL based off your site information:

http://<SharepointSite>/<SubSite>/_api/Web/Lists(guid'<GUID ID FOR YOUR LIST>')/fields

to obtain the GUID, you will need to go to http://<SharepointSite>/<SubSite>/_api/Web/Lists and do a search using your browser (a ctrl-F works fine) for the name of the list. Inside the XML for that list there look for something like this:

<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Fields" type="application/atom+xml;type=feed" title="Fields" href="Web/Lists(guid'xxxxxxxxx')/Fields" />

You can grab the HREF= section at the end and drop it directly into your browser appending it to your subsite URL.

Once you get to there, find the column named "meeting title" and look for the staticName node. Once you find that it should be what you will use to do the name of the column. It could just be anything but whatever is in there, that should be the name you should use in your code. My bet is you'll find something like this:

<dSmiley FrustratedtaticName>Title</dSmiley FrustratedtaticName>

<d:Title>Meeting Title</d:Title>

In which case you'll use "Title" as the column name. Let me know how that works.

0 Kudos
Reply