Skip to main content

I have seen similar questions like this asked but it seems none of the solutions I've seen and tried work. 

I have a People Picker control that sets calculated values for User ID, Email, and Phone. 

All I want to do is have text box controls contain the values from the calculated fields.  So like when you select a user in the people picker, a text box would have the value for Email or Phone.

I have tried using javascript but the change() method does not seem to work for the calculated value or the people picker control.   I know the java script works because if I arbitrarily fire a change() method on a different control like a dropdown then it will write the Email from the calculated value into my text box but that's not the functionality I need.  I need the value to be written to the text box once the person is selected in the people picker and I have not seen a  solution yet that works.

you can do it eg. following way

- update formula in calc value control to something like:   <Exististing formula> + UpdateTextBox()

- define javascript function like

function UpdateTextBox(){
   NWF$('#'+TextBox).val('Email');
   return "";
}


Thank you.  This worked perfectly.


Hi Marian,

I would like to use this example, but when I tried it didn't work for me.  I have obviously misunderstood something.

  • I updated my calculated value field to include the + UpdateTextBox()
  • I went to my form settings and put the javascript in, changing 'Email' the name of my text field
  • When I previewed the form the calculated field value didn't appear in the text field

Have I missed a step?

Thank you,

Christina.


above script was just an example how to 'simulate' resp. capture calculated control change event. and it just set "Email" string to text box.

if you want to set text box value to a value of calculated control control itsef  use something like following

UpdateTextBox(<Existing formula>)

function UpdateTextBox(inpval){
   NWF$('#'+TextBox).val(inpval);
   return inpval;
}

Thanks, Marian.  Forgive me, but this is really new to me and I'm unsure how to make this work.

So far I have added the first line to the calculated field so that it now reads:

I then copied the second part into the form settings.  I'm presuming I change the '#' for the name of the text field that I want to copy the calculated value in to, i.e.:

    function UpdateTextBox(inpval){
       NWF$('RiskRankingHSEScore'+TextBox).val(inpval);
       return inpval;
    }

Is this all correct?

THANK YOU!


everything is correct except of

            NWF$('RiskRankingHSEScore'+TextBox).val(inpval);

it should have been

NWF$('#' + RiskRankingHSEScore).val(inpval);

 

where RiskRankingHSEScore is javascript variable configured for text control, not its name.

if that still doesn't work or anything is still not clear I would suggest to start new question so that this thread doesn't confusing dealing with several different problems.


Hello Marian,  Can you check out my question on this configuration at: https://community.nintex.com/thread/18088-read-in-text-from-list-item-and-place-it-in-form-text-box

 

Thanks


checked happy.png


Thank You. It worked perfectly. Time saved!!

Hello guys, I was following this thread and tried the solution


I have updated my calculated values to = UpdateTextBox(Q3+W3)


 


6516iF5DB273C12757065.jpg


 


 


 


 


 


 


 


 


 


 


 


And updated the settings – form and entered this scrip


    function UpdateTextBox(inpval){


       NWF$('#' + E3).val(inpval);


       return inpval;


    }


6518iF8C0F070FBE2F62F.jpg


 


 


 


 


 


 


 


 


 


 


 


 


 


 


After updating


I select the preview form to test it but when run “Preview Form” it will only show like this. please wait


 


6519iCC30E9240F08294F.jpg


Did I miss something?


Im using share point/Nintex 2013


Reply