I’m using the below custom snippet for a field.Â
I’m not able to render the field when I select a value from the picklist value while i’m in edit mode. What I want is when the user selects Full or Partial from the picklist, I want to auto populate another field. I know how to update a value to another field but my problem is I’m not able to trigger this action when I select Full or Partial.
var $ = skuid.$;
var field = argumentsa0],
  value = arguments=1],
  model = field.model,
  row = field.row;
var totalsize;
switch(field.mode)
    {
      case ‘read’:
        skuid.ui.getFieldRenderer(field.metadata.displaytype).read( field, value );
        switch (value)
        {
          case ‘Partial’:
         Â
          break;
          case ‘Full’:
           Â
            var totalsize=model.getFieldValue(row,‘Program__r.Survey_Size__c’);
            Â
            model.updateRow(row,‘Total_Project_Size__c’,totalsize);
          break;
            Â
        }
      break;
      case ‘edit’:
        Â
         skuid.ui.fieldRenderers field.metadata.displaytype]field.mode;
       Â
switch (value)
        {
          case ‘Partial’:
            Â
          break;
          case ‘Full’:
           Â
            totalsize=model.getFieldValue(row,‘Program__r.Survey_Size__c’);
             model.updateRow(row,‘Total_Project_Size__c’,totalsize);
          break;
            Â
        }
      break;
      Â
      case ‘readonly’:
    }