Account information entering in a table . fields are Agency__c (type text) Revenue_Source__c(Type=Pick-list,Values=Phone,Web,Advertise),when ever Revenue_Source__c is selected as Advertise then should show as Agency__c Field.in a table other wise hide it.
$ = skuid.$;
model = arguments[0].model,
row = arguments[0].row ,
element = arguments[0].element;
var valueType = model.getFieldValue( row , ‘Revenue_Source__c’ );
function renderField( fieldName,defaultValue ){
var field = new skuid.ui.Field( row, model, null, {
fieldId: fieldName, register: true } ),
value = model.getFieldValue( row , fieldName ) ||defaultValue;
console.log( field, value );
if(field && field.metadata && field.metadata.displaytype ){
//skuid.ui.fieldRenderers[field.metadata.displaytype][field.mode]( field, value );
console.log( fieldName + ’ rendered!‘, field.element );
skuid.ui.fieldRenderers[field.metadata.displaytype].edit( field, value );
}
return field.element;
}
switch ( valueType ){
case ‘Advertise’:
element.append(renderField( ‘Agency__c’ ,’'));
break;
}
this code is working for page loading but not working when i changed picklist value in feild in Edit Mode.
Any one suggest me.
Question
in Table unable to render( Hide or Show) a field based on another pick list field value changed.
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
