Hi Plumsail,
I was wondering if it was possible to determine the number of records were added to Data table Control and push this to a SharePoint field?
If user added three records to a Data Table control, I want to print the number 3 to a SharePoint field (which will be hidden on the form)
Thank you!
Hi @DryChips,
You can get the record count by using fd.control('DataTable').value.length:
fd.spRendered(function() {
fd.control('DataTable').$on('change', function() {
fd.field('HiddenField').value = fd.control('DataTable').value.length;
});
});
To hide the "hidden field", use this code:
fd.spRendered(function() {
fd.field('HiddenField').hidden = true;
});