“Havings” / “Post-Aggregation Conditions” can be set via JavaScript using the same API’s that are used for setting “Pre-Aggregation Conditions”: getConditionByName( ) and setCondition( ). getConditionByName( ) will search through both Pre- and Post- Aggregation Conditions when searching for name matches, and setCondition( ) works on either Pre- or Post- Aggregation Conditions.
For instance, if you have an Aggregate Model named “AggData” with a “Having” Condition named “recordCount”, you can set the value of this Condition from JavaScript like this:
var model = skuid.$M("AggData");<br>var recordCountCondition = model.getConditionByName("recordCount");<br>model.setCondition(recordCountCondition, 42);
Zach To the Rescue! I Always appreciate everyone’s help. Thanks!
Just wanted to say Thanks for this also. We implemented ‘Havings’ on our community Skuid page to expose our available inventory. One of our filters is on quantity, and we needed that post aggregation condition on our model to sum the inventory quantities together and the return results. Used a JS snippet to set the condition and return the results. Good stuff.