Hi Guys,
I’ve got a use case where I want to filter a model based on varied conditions that a user might select. The problem is that I don’t know what these conditions will be ahead of time.
So my question:
Is it possible to add conditions to a model at dynamically at run-time? I don’t mean activating quiescent conditions with setCondition, but rather adding a totally new condition and re-querying an existing model.
I’ve tried variants of this type of thing, but just can’t get the new condition into the query.
var tasksModel = skuid.$M('Tasks');<br>tasksModel.conditions.push({ type: 'fieldvalue', field: 'Id', operator: '=', value: 'Apple', inactive: false, name: 'Apple', encloseValueInQuotes: true }) tasksModel.initialize().register().updateData(); tasksModel.soql;<br>
Any ideas would be greatly appreciated.
Thanks,
Dan Arnison
PractiFI