brianknight
Design Canvas Artiste

Use Button to Update Single Line of Text control

Jump to solution

Ok I am trying to update a single line of text control when clicking on a button.  I've followed @harryr's post https://community.nintex.com/t5/Nintex-for-SharePoint/Print-a-JS-var-value-to-a-single-line-text-box... and was able to successfully populate the control when I use a static value.  Here is my current code:

var formValue = NWF$('#' + AddressValue);

function updateBox(){NWF$("#"+Address1).val(formValue);};

 

AddressValue is a JavaScript variable Name for a Calculated field

formValue is a JavaScript variable Name for the Single Line of Text I would like to populate data into.  

When I run it now, I see the following [object Object] in the control.  I'm guessing the problem is how I'm identifying the variable within the function.  Any assistance here would be greatly appreciated.  

0 Kudos
Reply
1 Reply
brianknight
Design Canvas Artiste

Re: Use Button to Update Single Line of Text control

Jump to solution

Ok, figured what I was doing wrong.  Not a JS coder, so I had to look around to find it.  So I was referencing just the object formValue, not the contents within the object.  Here is what the final code looks like

var formValue = NWF$('#' + AddressValue);

function updateBox(){NWF$("#"+Address1).val(formValue.val())};

 

View solution in original post

0 Kudos
Reply