Lotus Code Needed

5 pts.
Tags:
Lotus Notes 8.1
Lotus Notes Fields
I'm trying to complete an @If statement to compare two fields in Input Validation. Field One: SL_1 (Values only can be 0 to 24) Field Two: D_1 (Values only can be 0 or 1) Current Code: @If((@ToNumber(D_1) > 1); @Failure("Sunday needs to be a 0 or 1");@Success) Additional Code Needed: If SL_1 = 0; D_1 must be 0 (After first Edit of document) If SL_1 = 1 (1 to 24), D_1 must be 1 Thanks for any and all suggestion.

Software/Hardware used:
Lotus Notes 8.1
ASKED: November 16, 2012  7:56 PM
UPDATED: November 16, 2012  11:22 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

You could try
@If((@ToNumber(D_1) > 1);
         @Failure(“Sunday needs to be a 0 or 1″);
     ((@ToNumber(SL_1) = 0) & (@ToNumber(D_1) > 0));
         @Failure(“Sunday needs to be a 0″);
     ((@ToNumber(SL_1) > 0) & (@ToNumber(D_1) < 1));
         @Failure(“Sunday needs to be a 1″);
     @Success)

BUT, if the value of SL_1 determines what D_1 must be, why not simply set the value of D_1 based on SL_1, instead of asking for the value?

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following