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

How to Auto populate folder Name in list column in nintex column through using java script

Jump to solution

Hello,

i have created a list . List Contains folders. List has nintex form.

When ever user click on folder , that folder name is populate into nintex form in one of the column.

Here i able to  get  the folder name, but i'm unable to save that folder name into nintex form filed.

below is the  code i have used.

$(document).ready(function() {

alert("hi");

var folder1 = "folder1";

$("input [title='Component']").val(folder1);  ===> here i'm facing the problem .

how to  auto populate the folder name into nintex forms field.

Could you please help me out .

Thanks,

Santhosh

Labels: (1)
0 Kudos
Reply
6 Replies
Automation Master
Automation Master

Re: How to Auto populate folder Name in list column in nintex column through using java script

Jump to solution

you have to assign a javascript variable in control's configuration dialog (eg. varFolderControl)

then you can assign a value to it like

NWF$('#' + varFolderControl).val(folder1)

0 Kudos
Reply
Not applicable

Re: How to Auto populate folder Name in list column in nintex column through using java script

Jump to solution

Marian is correct, that's the "official" way to set a field value from Javascript.

Unfortunately there are some wrinkles and inconsistencies-

  • With some field types (column types), the "assign field ID to a variable" option just plain doesn't work. The workaround is to assign a unique class to the field and use that as a pseudo-ID.
  • With several field types, setting a value with .val(my_new_value) also doesn't work. Taxonomy fields, People pickers, Attachment fields, Rich text fields, (lookup fields), all suffer from this problem. With the simpler "funny" fields you can find a workaround after a few hours poking around in the HTML of the form with something like Firebug, but the lookup style fields (taxonomy etc.) are real toads to work with.

Nintex could add massive value to their product if they just fixed this once and for all, by providing standardised Getter+Setter Javascript functions to ALL the form field types. Unfortunately it's been the way it is for a couple of years now so i'm not holding my breath.

0 Kudos
Reply
santhoshraj
Nintex Newbie

Re: How to Auto populate folder Name in  list column in nintex column through using java script

Jump to solution

thanks for your reply.

In the above example what is "varFolderControl". Is it control name?

For example:

form1.PNG

Do we need to change Name of the control to "varFolderControl"?

Thanks in advance,

0 Kudos
Reply
Automation Master
Automation Master

Re: How to Auto populate folder Name in list column in nintex column through using java script

Jump to solution

no, you have to configure it at the very bottom of configuration dialog

Reply
santhoshraj
Nintex Newbie

Re: How to Auto populate folder Name in  list column in nintex column through using java script

Jump to solution

Hi Marian,

It's working fine !!.

Thanks for the  solution. Great !!!

Regards,

Santhosh.

0 Kudos
Reply
Automation Master
Automation Master

Re: How to Auto populate folder Name in list column in nintex column through using java script

Jump to solution

glad to hear.

consider marking the question answered.

Reply