How to get the Filterable subcondition using javascript

Hello I have a condition on a model. The state of the condition is filterable default off with name ‘Process_Id’ and value is result of subquery. And I also have subcondition on that sub query and the state of the subcondition is also filterable default off with name ‘ServiceType’. How can I access Subcondition ‘ServiceType’ using Javascript.  Thanks!

getConditionByName takes a 2nd boolean parameter — if this parameter is set to true, then filterable Sub-Conditions will be searched / returned as well by getConditionByName, e.g.

// Get a reference to our model<br>var myModel = skuid.model.getModel('MyModel'); // The 2nd parameter being set to true&nbsp;<br>// tells Skuid to look through Sub-Conditions as well as top-level Conditions for name matches<br>var serviceTypeCondition = <b>myModel.getConditionByName('ServiceType',true)</b>; // Change the value of the Condition<br>myModel.setCondition(serviceTypeCondition,'some service type');

For more details, go to the skuid.model.Model object API documentation, and search for getConditionByName