Skip to main content

Hi Emily Billing‌,

I have column (for ex column name is SupplierName) and I have a value in that field, I want to update same value in the multiple columns while submitting the request.

I wrote a function like below to update value in some other columns

function SupplierName(value) {
NWF$("#" + col2).val(value);

NWF$("#" + col3).val(value);

NWF$("#" + col4).val(value);

}

I can able to get the value from the suppliername filed by using below

value= NWF$("#" + SupplierName).val();

Now I want to know how can I call that function and pass the value to another fields

Thanks,

Jagadeeswar Reddy D. 

Hi,

Out of the box you can use calculated columns on SharePoint list to achieve this, but you will  not be able to change the calculated column values manually. Do you want to edit col2, col3, col4 values at later point time?

However, below is the script to achieve this, have this function call and definition in your Form Settings --> Custom Javascript section.

NWF$(document).ready(function()
{

ctrlSupplierName = NWF$("#" + SupplierName);

//Bind change event to SupplierName control
ctrlVendors.change(populateOtherColumns);

});

function SupplierName() {

//get value of the suppliername control

var value = NWF$("#" + SupplierName);
NWF$("#" + col2).val(value);

NWF$("#" + col3).val(value);

NWF$("#" + col4).val(value);

}

Thanks,

Krishna.


Hi, is your problem solved?


Reply