My goal is to present a certain total value of everything under a field of a table in a grid based on specific conditions like date range.
here's what I did to capture the date range from two input fields:
<input type="date" id="startdate"/>
<input type="date" id="enddate"/>
var dateArray = '[$('#startdate').val(),$('#enddate').val()]';
var dateJSON = JSON.stringify(dateArray);
Now my problem is my on my first JSON script. It's not presenting what it should on the grid column where it should.
{
"Type": "condition",
"Data": {
"Type": "And",
"Expressions": [{
"Type": "compare",
"Data": {
"Type": "GreaterThan",
"Left": {
"Type": "field",
"Data": {
"Table": "table",
"Field": "date"
}
},
"Right": {
"Type": "constant",
"Data": "dateArray"
}
}
}, {
"Type": "compare",
"Data": {
"Type": "LessThanOrEqual",
"Left": {
"Type": "field",
"Data": {
"Table": "table",
"Field": "date"
}
},
"Right": {
"Type": "constant",
"Data": "dateArray"
}
}
}]
}
Anything that could help would be very much appreciated.
dateArraydeclaration, like this:var dateArray = [$('startdate'),$('enddate')];