Skip to main content

I read in this post Nintex Form Rules to set the value of controls – Customer Feedback for Nintex  that you could now create action rules for single line of text controls.  It was in the newest update.  I went out, downloaded and installed that update.  However, the rule is still missing from my controls.  Am I missing something? I also need this functionality in date controls.  I'm guessing that is not available.  Essentially I need to identify when someone enters a date into a specific control.  When that occurs, a value needs to change in a single line of text control.  That will allow me to kick of a workflow that checks for this value.  If the value equals a specific number a handful of emails are sent out.  This was a function I had in Infopath forms and it allowed me to do things behind the scenes without user action.  Cause we all know if we ask users to do something extra, it will never happen.

That rule option is only available in the new Responsive Forms 

213196_pastedImage_2.png


I don't have the time to post about it now, but can make a write up later of how to accomplish this using the Classic Forms rule system. Just know that it requires javascript (as some people are put off by js. or simply cannot implement it in their own / client's environment). 



Any chance you could look at some code I've tried to cobble together to get something to work?  Essentially I'm picking a value from a list lookup.  I want that choice to populate another control (a single line of text) on the form.  Here is my control settings from the list lookup

213551_pastedImage_1.png

Here is the settings from the Single Line of Text box control

213552_pastedImage_2.png

Here is the code I've attempted to cobble together.  Yes, I'll admit I'm pretty horrible when it comes to Javascript.  Its been quite some time since I have even attempted to code JS.  Unfortunately, it is not like a bike and you do forget how to code it happy.png.  Basically the drop down doesn't populate the SLT box.  I've tried to insert different console.logs to try and follow what is getting captured, and it doesn't report back anything.  I can only assume I'm not capturing the correct value.  Any help here would be greatly appreciated.

function ReturnMySelection(source, arguments) {

var myselection = NWF$('#' + ddlPicker + ' option:selected');

var selectionText = myselection.text();

NWF$('#' + ddlSelection).val(selectionText);console.log(selectionText);

}

 


Something along the lines of this should work. 

note that I have changed your second function argument from the name 'arguments' to something else as the term 'arguments' is used natively by javascript 

function ReturnMySelection(validationSpan, validationObject) {

  var selectionText = NWF.RuntimeFunctions.parseLookup(validationObject.Value) || validationObject.Value;
  NWF$('#' + ddlSelection).val(selectionText).trigger("blur");
  console.log(selectionText);

}

That worked.  Thank you.  


Reply