Data Table Logic

I am learning as I go on this one and I'm not sure of the capabilities but here are the bullets of what I'd like to do with it. Currently I have fist bullet "kinda" working with the below code. Not ideal but it's the only thing i could figure out.

Data Table purpose: Drivers fill in all of their violations for an annual review. They add a new row per violations filling in Date, Violation Type (Drop down with "Other" option), and location of violation.

  1. If driver selects "Other" make the next column Editable otherwise it's read only.
  2. Make the column "Other" required if Violation Type "Other" is selected.
  3. Return a record count in the Before Save to ensure they added all they expected to.

fd.control('ViolationTable').addColumnValidator('Violation', {
validate: function(value) {
if (value == 'Other') {
fd.control('ViolationTable').columns[2].editable = function(){return true};
return true;
fd.control('ViolationTable').columns[2].editable = function(){return false};
return true;

Hello @IT.Joe,

You can validate how many records are in DataTable control. Please see the code example here.

I need to check with our developers is it possible to require or enable/disable the column based on the other column value. I'll write to you as soon as I get a reply from them