Simple Java question?

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
User avatar
dominique.beaudin
Posts: 49
Joined: Tue Mar 06, 2018

20 Mar 2018

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.

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

20 Mar 2018

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);
} 
Cheers

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 14 guests