Tag Archives: Lotusscript

Not a sub or function name

If you suddenly start getting errors from a scriptlibrary or on a button in a form or a view.
Errors like this

  • Not a sub or function name
  • Sub or Function Not Defined
  • DB is not declared
  • Variable not resolved
  • Unable to find XXXX

Check that you variables / functions / Subs is declared as public

This is done at the top of the library or form using Options Public

This error can easily be mistaken with 64K library problems, Lotusscript recompile issues and other HCL Domino FP9 and FP10 related issues

Quick tips: if you are importing data in an LS agent

If you are importing data in Lotusscript and the imported files is in utf-8 so you have specified in the open command charset=utf-8 make sure that were you are getting the files from don’t suddely produce an ordinary ANSI ascii file. Then you will probably get a server crash, because there is not check if the file is utf-8 so it tries to read the ordinary file as a multibyte file. That will corrupt arrays, lists and eventual crash the client/server.
So make sure the file format is what you think it is. One great tool to do so with is NotePad++