Page 1 of 1

Simple Java question?

Posted: 20 Mar 2018
by dominique.beaudin
I am doing what should be simple - update two form fields when another field is updated

fd.field('Association').change(UpdateOthers());

function(UpdateOthers){
var myString = fd.field('Association').value();

fd.field('VIN').value(myString);
fd.field('Title').value(myString);
}

It looks right to me (I am more SQL oriented and have been relying on samples from others) What am I doing wrong? I am ultimately trying to get the left 4 characters of the Association and add some random number (or the length of the string) as a new field.

Help is gratefully appreciated.

Re: Simple Java question?

Posted: 20 Mar 2018
by Nikita Kurguzov
Dear Dominique,
Try this instead:

Code: Select all

fd.field('Association').change(function(){
  UpdateOthers();
});

function UpdateOthers(){
  var myString = fd.field('Association').value();
  fd.field('VIN').value(myString);
  fd.field('Title').value(myString);
}