I have a problem with search.
I want to serch data on a field like tbl_fld1 and condition is
tbl_fld1 != 0
I write a method and attached with onShow event
my code is
controller.find() ;
tbl_fld1 != 0
controller.search();
It shows all records and unable to search.
But through menu if I put != 0 at tbl_fld1 then it is working.
Hi
Try using
controller.find() ;
tbl_fld1 = “!=0”
controller.search();
i think will be ok
Thanks Rodney.
Its working.
But I do that another way
controller.find()
tbl_fld1 = 0;
controller.search();
controller.invertRecords();
subhranild:
Thanks Rodney.
Its working.
But I do that another way
controller.find()
tbl_fld1 = 0;
controller.search();
controller.invertRecords();
Doing this you are firing 2 queries when only 1 is enough.
Take a look at the manuals, they are really well done. Online help is a good resource too.
I face a new problem to search.
please any one help me.
I want search between two dates and two dates will be taken in two global field and search will on between two globals.
I want search between two dates and two dates will be taken in two global field and search will on between two globals.
Try this to get you started:
var startdate = globals.ctf_CreatedDate
startdate.setHours(00)
startdate.setMinutes(00)
startdate.setSeconds(00)
var thestart = utils.dateFormat(startdate, 'MM-dd-yyyy HH:mm:ss')
var enddate = new Date()
enddate.setHours(23)
enddate.setMinutes(59)
enddate.setSeconds(59)
var theend = utils.dateFormat(enddate, 'MM-dd-yyyy HH:mm:ss')
controller.find()
createddate = thestart + '...' + theend+ '|MM-dd-yyyy HH:mm:ss';
controller.search();
Regards
Graham Greensall
Worxinfo Ltd
var d1 = globals.start_date
d1.setHours(00)
d1.setMinutes(00)
d1.setSeconds(00)
var df1 = utils.dateFormat(d1, 'MM-dd-yyyy hh:mm:ss')
var d2 = globals.end_date
d2.setHours(23)
d2.setMinutes(59)
d2.setSeconds(59)
var df2 = utils.dateFormat(d2, 'MM-dd-yyyy hh:mm:ss')
controller.find()
dateentered = df1+'...' + df2+'|MM-dd-yyyy hh:mm:ss'
controller.search()
This should help you. You can search between dates using the …
Thanks to Graham and sanneke.
Both of ur code working nicely.
Thanke once again.