I am trying to write my first Javascript code to set the condition of one of my models, but I am getting an “Uncaught TypeError: undefined is not a function” message on my if statement and I’m not sure how to make this a function. I have tried to read other posts to figure this out, but I think that I have hit a wall with my little understanding of Javascript. I am trying to activate and set a condition if a checkbox on another the TableFilter model is checked.
var myModel = skuid.model.getModel(‘AlumniConnections’);
var myModel2 = skuid.model.getModel(‘TableFilter’);
var myModel3 = skuid.model.getModel(‘Admit’);
var DesiredIndustry = myModel.getConditionByName(‘DesiredIndustry’);
r = myModel2.getFirstRow();
s = myModel3.getFirstRow();
if (r.X1__c ===true) DesiredIndustry.setCondition(DesiredIndustry, s.Job_after_MBA__c);
Question
Javascript Error
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
