Solved

setting an Email Column initial value to a calculated value not quite working.


Badge +9

Hi

 

It is probably me doing something incorrectly.   I have added a calculated control to my form which as you can see in the New-> Generated Preview, suggests an email address,.

 

auto generating an email field.png

 

What I don't seem to be able to do is set the Email column to the calculated value. I have tried

 

  1. connected the calcSuggestedEmail to Email . Note, regarding  Email Column; I can't set a default value to a named control unfortunately angry.png
  2. A formatting rule on Email, to set it to calcSuggestedEmail

 

Any thoughts anyone please.

 

Daniel

icon

Best answer by westerdaled 8 June 2016, 15:46

View original

7 replies

Badge +6

Hey Daniel,

for the moment I don't know how to achieve this, but why don't you just connect your calculated value control to your "Email" list column?

Can you tell us how your solution should look like in the end?

Best regards,

Jan

Badge +9

Jan

Thanks for your reply. Yes I tried that.  I found I also couldn't set my Email list column default value  to calcEmail Control ...   

At the moment my testers are copying and pasting the calcEmail value into the the Email List Column...  Not exactly slick!

I think it will come down to a JavaScript handler that is set up in the Document Ready function.  Is there an example out there I could try out?

Daniel

Badge +11

Daniel,

When SharePoint columns and Nintex forms let me down like this, I just create an on-create, on-modify workflow that copies things for me instead of doing this manually. It is not as instantaneous as a formula, but easier to live with than manual work.

Badge +9

Shaunlub

Thanks for your reply. In this case I disagree as the suggested email is designed to allow the Requester make a final edit before submission e.g. Jane.Doe2@domain.com

Also,  I am finding even in my fairly straight forward New User Request I have a large workflow already to handle: decision points,  calculations, parse collections etc. I have spoken to my client and they are happy for a bit of JavaScript as long as I train the team who will be supporting these forms / workflows going forward.

Daniel

Badge +11

Yup - you've hit on one of the biggest stumbling blocks for making Nintex 365 forms more usable - lack of connectivity of on-form-only data. The answer would probably be Form Variables (like  on On-Prem)...

Looks like JavaScript is the only way for a New Mode form.

Badge +9

shaunlub

If I add the code  commented below to the form I do get the second message box when I tab away from the Last Name ...

So far I can't use the same handler on the calcEmail field .. oh well this is a bit of progress...

NWF$(document).ready(function ()

{   alert("form ready") ;

var emailId = NWF$("#"+varEmailId);

/* Dan: this works ok.

var lastNameId = NWF$("#"+varLastNameId);    

   lastNameId.change(function() {

   alert(lastNameId.val());

       /* Yay I I can add this to the email column */

       emailId.val(lastNameId.val());

}); */

/*  This doesn't do anything :-(   */

var calcEmailId = NWF$("#"+varCalcEmailId);

    clacEmailId.change(function() {

    alert(calcEmailId.val());  });   

});

Badge +9

Got talking to my colleage next to me and had a light bulb moment

var emailId = NWF$("#"+varEmailId); var calcEmailId = NWF$("#"+varCalcEmailId);

var lastNameId = NWF$("#"+varLastNameId);

    lastNameId.blur(function(){

  alert(lastNameId.val());

  /* emailId.val(lastNameId.val());  */

  emailId.val(calcEmailId.val());

  });

Reply