Database-Driven Grid w/Multiple parameter values
Posted: Thu Mar 10, 2016 6:12 pm
Hi all,
I have a display screen that i want to show transactions that are between two dates(Field ID's Date1,Date2), however i cannot get it to work. The selection criteria is as follows:
The parameter values are as follows:
The event is fired from a onchange event for the Date2 field with the following code:
If i remove the last AND clause from the selection criteria it works, however this is not what i need as that gives me records for everything greater than or equal to YDATE. Another note is that when i look at it in firebug, p1 is always equal to Date2 and p2 is 1. I have attached screen shots showing the firebug debugger and set up in visual designer. We are using version 5.3.2
Thanks for your help
I have a display screen that i want to show transactions that are between two dates(Field ID's Date1,Date2), however i cannot get it to work. The selection criteria is as follows:
Code: Select all
YTDC='C' AND YDATE >=? AND YDATE <=?
Code: Select all
parameter value: script: "1" + get("Date1").substr(6,2) + get("Date1").substr(0,2) + get("Date1").substr(3,2);
parameter value 2: script: "1" + get("Date2").substr(6,2) + get("Date2").substr(0,2) + get("Date2").substr(3,2);
Code: Select all
applyProperty("Grid1", "parameter value", "1" + get("Date1").substr(6,2) + get("Date1").substr(0,2) + get("Date1").substr(3,2));
applyProperty("Grid1", "parameter value 2", "1" + get("Date2").substr(6,2) + get("Date2").substr(0,2) + get("Date2").substr(3,2));
applyProperty("Grid1", "field type", "grid");
getObj("Grid1").grid.refresh();
getObj("Grid1").grid.render();
Thanks for your help