Skip to main content
Nintex Community Menu Bar
Question

How to get the Filterable subcondition using javascript

  • July 9, 2024
  • 1 reply
  • 7 views

Forum|alt.badge.img+6

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!

This topic has been closed for replies.

1 reply

Forum|alt.badge.img+13

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