1

How to end if statment in lotus notes.

example.

@If(@Text(textbox1)="";@Failure("Please input your name");@Success);@command([filesave])
asheeshr
  • 4,088
  • 6
  • 31
  • 50
LyodMichael
  • 85
  • 2
  • 13

4 Answers4

7

You can end execution of formula statements by using @Return("").

Please read the documentation which is part of your Lotus Notes and Domino Designer clients. Look for the Help databases in the help folder of your Lotus Notes data directory.

Here's the online help for @Return: http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp?topic=%2Fcom.ibm.designer.domino.main.doc%2FH_RETURN.html

Here's the online help for @If: http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp?topic=%2Fcom.ibm.designer.domino.main.doc%2FH_IF.html

Per Henrik Lausten
  • 21,331
  • 3
  • 29
  • 76
3

You can skip @success afaik and try this:

@If(
    @Text(textbox1)="";
    @Failure("Please input your name");
    @command([filesave])
);

Another option is to use @do:

@If(
    @Text(textbox1)="";
    @Failure("Please input your name");
    @do(
        @success;
        @command([filesave])
    )
);
Christian Waidner
  • 1,324
  • 1
  • 13
  • 22
0

Per the documentation, @Failure is intended for use only in input validation formulas.

Link to @Failure documentation

That article describes how it should be used.

Newbs

Newbs
  • 1,632
  • 11
  • 16
0

You can replace the failure method by a simple prompt.

@If(
    @Text(textbox1)="";
    @prompt([OK],"Warning", "Please input your name");
    @command([filesave])
    );
PEC
  • 632
  • 1
  • 11
  • 28