Hi,
what's the correct sintax for writing a method that searches records between a date interval (e.g. all the order of 2002)?
If I use the form "1-01-2002...31-12-2002", it works in a manual search, but not in a method.
What am I missing?
maarten wrote:try this...
myDate = '01-04-02...31-04-03|dd-mm-yy'
OR
myDate = '04-01-02...04-31-03|mm-dd-yy'
etc..
But I have a little problem: since the syntax uses the ' character to separate Dialog items, how can I use that character (very common in italian) inside a string?
I tried to enclose it between " or \, but it doesn't seem to work
The method is:
var sceltannata = ""
var sceltannata = plugins.dialogs.showSelectDialog('Seleziona annata','RICERCA ANNATA MORNINGER\n\nSeleziona annata',
'1993','1994','1995','1996','1997','1998','1999','2000','2001','2002','2003')
controller.find()
data = "1-01-" + sceltannata + "...31-12-" + sceltannata +"|dd-MM-yy"
controller.search()
forms.elenco.controller.show()
maarten wrote:Hi Ricardo,
Instead of doing this > plugins.dialogs.showSelectDialog('Alert','there's a problem here')
(bold single quote creates syntax error)
do this >plugins.dialogs.showSelectDialog("Alert","there's a problem here")
This should work(as well as escaping \), although I understand from your words , you've already tried this. Does the Method editor warns you, when you try to save the script , or does the script itself runs incorrect?
Users browsing this forum: No registered users and 1 guest