Skip to main content

This javascript error:


Perhaps these conditions are the trouble?


Trying to use these as conditions for a date range filter on a table.


What is the best way to set defaults for a table’s date range filter, if not this?

bump


bumpity-bump-bump


Matt,

It’s that “StartDate” condition. We aren’t parsing the “LAST_N_DAYS:30” bit into an actual JavaScript Date, which is leading to the JavaScript error. Unfortunately, that’s just the way it is right now because that’s a Salesforce convention, and server side, we’re just letting SOQL do its thing. Pat did share a JavaScript way of going about it a while back, but as far as Skuid the product goes, you have a specify a single date or leave it blank at this point. We should handle that JavaScript error more gracefully though so that your page doesn’t bomb. We’ll get that addressed in an upcoming patch.


Thanks, J dot

I found Pat’s post and am now using that.

(thanks again, Pat!)


Sure thing! By the way, the fix turned out to be simpler than I thought, and it’ll go out in Banzai Update 5. You’ll be able to give those conditions values like “LAST_N_DAYS:30” now, and the queries will run accordingly, but the filter still won’t reflect it.


Nice! Thanks.


Reply