Skip to main content

This code for a custom field renderer with the Model se to “Act” says that it cannot find the ActId. What am I missing?


Thanks!

Anna


var params = argumentse0], $ = skuid.$;

var field = argumentse0];

var model = field.model;
var row = field.row;
console.log(row);
var Act = row.Name__r.Id;
var ActId = row.Name__r.Id;
console.log(ActId);

var NoOfActPerformers = 0;

var ActPerformers =‘none’;

var ActPerformerModel = skuid.model.getModel(“MMA_Academy_Student_Event_Act_Performer”);


ActPerformerModel.setCondition(ConditionForSpecificAct,Id);

ActPerformerModel.updateData(function(){

NoOfActPerformers = ActPerformerModel.data.length;

console.log(NoOfActPerformers);

if(NoOfActPerformers>0){

for(i=0;i<NoOfActPerformers;i++){

ActPerformers = ActPerformerModel.dataei].MMA_Student__r.Name;

console.log(’ ActPerformers ’ + ActPerformers);

HtmlString = HtmlString + ’



‘+ ‘&nbsp;’ + ‘&nbsp;’ + ‘&nbsp;’ + ‘&nbsp;’+ ActPerformers +’
';

var cellElem = field.element;

cellElem.html(HtmlString);


            }


}

});

Sounds like Name__r.Id is not being returned in the model. 




If I am looking for the id of the row in the field editor, what would should I use?


I figured it out. Some other issues were preventing it from loading. Nothing fun enough to share here though. Thanks!