Is it possible to make child conditions "Filterable Default Off" and then use an action to "Active a

Is it possible to make child conditions “Filterable Default Off” and then use an action to “Active and Set Model Condition”

Child conditions on child relationships?

Yep. (I think). I want to use a child template in a table, but I need to put conditions on the children that appear. The conditions on children fields in a model are “Always on”. I’m wondering if I can hack xml to allow them to be set dynamically by a button then requery the whole model. Also, I tried setting the condition to “in another model”, but it doesn’t seem to work. If I could get that working, I could accomplish what I am looking for by putting conditions on that other model. Thanks!

Hmmm … I’m sure it’s possible one way or the other.

This works for now in javascript but be warned of Skuid’s explicit lack of support for it.

All properties in the Condition Metadata Object should be treated as read-only. Overwriting these values on the rendered page will result in undefined behavior and likely cause unexpected and undesirable results.

skuid.model.getModel('modelName').fieldsMap.Child_Relationship__r.subConditions[subConditionIndex].inactive = true; // sets the sub condition to inactive<br>skuid.model.getModel('modelName').fieldsMap.Child_Relationship__r.subConditions[subConditionIndex].inactive = active; // sets the sub condition to active

You can do the same thing with setting the condition’s value

skuid.model.getModel('modelName').fieldsMap.Child_Relationship__r.subConditions[subConditionIndex].value = singleValue; // sets the sub condition value if it's a single value condition<br>skuid.model.getModel('modelName').fieldsMap.Child_Relationship__r.subConditions[subConditionIndex].values = valueArray; // sets the sub condition value if it's a multi-value condition

Yup. You did the digging I didn’t want to. :wink:

Ha I did the digging a while back. Just sharing the dirt now.

Love your dirt!

Thanks for digging and sharing the dirt :slight_smile: