Search code examples
linuxwindowslotus-dominolotusscript

Search formula not working on Linux machine


I have a strange behavior: an agent called via an AJAX request should search documents to display in a calendar. For that reason I compute a search formula and then run the search method of my database in Lotusscript. This is the formula:

form="mholiday" | form="mserviceevent" | (form="mereignis" & co_status!="9") & @texttotime(@text(startdatetime)) >= [29.09.2014] & @texttotime(@text(enddatetime)) =< [10.11.2014]

Everything's fine on Domino on Windows but fails with "formula error" on a Linux machine. Am I missing something? If I omit the term with the dates everything is fine, so this is the part that causes the error.


Solution

  • Try it with @ToTime() and @Date() instead. That might help to get away from local settings' influence on server:

    ...  & @ToTime(startdatetime) >= @Date(2014; 9; 29) & ...
    

    @ToTime() doesn't convert the field if it's a date time value already.

    @Date doesn't depend on local settings whereas [29.09.2014] probably does.