Working on a report page.
I have a model which collects some Ids based on a date range. The range is set to the last 30 days on pageload. A table component at the top of the page allows the user to set the date range.
I have a model aciton on that DateRange model so that qhen it iw queried, a bunch of other models are queried which reference the Ids of the rows in DateRange.
Now, if the date range is set such that DateRange returns 0 rows, I want the other models to return 0 rows. So I set the no value behavior to noquery.
The problem comes when the date range is changed from something that returns rows to something that doesn’t return rows, because then the other models don’t query and remain with their previous values (based on the old date range). Is there a way that I can force a query so that the models return nothing? Or just empty the models?
Seems like a no value behavior of ‘empty the model’ would be nice here.
Page 1 / 1
We’ve had some internal discussions about this scenario. Adding in a “make condition false” No-Value Behavior is something that has been proposed. One trick you can do right now though is add an additional condition that will always be false. Like Id = . Then add in some condition logic like 1 OR 2. Where condition 2 is your “always false” condition. That way, when your main condition is deactivated, your model returns no rows.
Nice work-around. Thanks, Ben.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.