Unsuccessfully attempting to filter a data view using two date pickers within Kinetic WEB. I’m thinking there’s something wrong with the created view’s REST Param and I’m hoping someone can verify it.
Here’s the panel card grid setup with the two date pickers added:
{
“whereClausetest”: “LaborHed_ClockInDate >= ‘??{TransView.dtFrom}’ and LaborHed_ClockInDate <= ‘??{TransView.dtTo}’”
}
Result:
When selecting the created “By Date Range” view in preview mode, all records from the BAQ are shown. For the “whereClausetest”, is the correct syntax “whereClause” or “whereClause
Honestly, same.
It was in a lab book that I lost from a couple years ago. I don’t recall what the single does, but the two allows it to send a null value.
The ?? syntax indicates that if there is no Part.PartNum value, then replace the value with an empty string, or whatever the default empty value is for the related data type.
If the syntax for that portion of the whereClause were to be changed to ‘?{Part.PartNum}’ then Part.PartNum is required. If the value is empty, then the REST call will not be made an the grid will be emptied.
Thanks so much for explaining that, Hannah - this worked swimmingly. I did have to set the date pickers’ mask to the BAQ field format, otherwise the filtering did not work.
This is great. Thank you so much for the helpful thread.
I have a question. I have a BAQ with Invc_Head and Invc_Dtl so i can see who purchased Parts. There are no query parameters in the BAQ. I uplifted the dashboard from 10.1.400 and made the changes from this and the How To: Kinetic Dashboard Uplift thread. When I open the dashboard, I have to wait for every record to load before I can search. How do I keep the records from loading when the dashboard is opened? I want it to wait until I fill in the search fields on the dashboard.