?
Solved

receiving a notes error upon field validation completed

Posted on 2003-03-12
17
Medium Priority
?
813 Views
Last Modified: 2013-12-18
I have some fields that have validation formulas that work fine, however when the field validation is performed and a message is displayed stating something like invalid value please reenter.  When you hit ok another error box is displayed stating Notes Error-Field didn't pass validation formula you click ok and it goes away.  Why is that second pop up box showing ???  Is there something wrong with the validation formula.  Here is a field that it happens on.
@If(
CMpkgID = ""; @Failure("Package ID is required.");
(@Middle(CMpkgID;3;1) != "2" &
@Middle(CMpkgID;3;1) != "3" &
@Middle(CMpkgID;3;1) != "4");
@Failure("Package Stage is Invalid - Please reenter valid Stage i.e. 2,3 or 4.");
(@Middle(CMpkgID;4;4) != "REFR" &
@Middle(CMpkgID;4;4) != "refr" &
@Middle(CMpkgID;4;4) != "CLMS" &
@Middle(CMpkgID;4;4) != "clms" &
@Middle(CMpkgID;4;4) != "ECOM" &
@Middle(CMpkgID;4;4) != "ecom" &
@Middle(CMpkgID;4;4) != "CLNT" &
@Middle(CMpkgID;4;4) != "clnt" &
@Middle(CMpkgID;4;4) != "CONV" &
@Middle(CMpkgID;4;4) != "conv" &
@Middle(CMpkgID;4;4) != "MULT" &
@Middle(CMpkgID;4;4) != "mult" &
@Middle(CMpkgID;4;4) != "PAUT" &
@Middle(CMpkgID;4;4) != "paut" &
@Middle(CMpkgID;4;4) != "PBWR" &
@Middle(CMpkgID;4;4) != "pbwr" &
@Middle(CMpkgID;4;4) != "PROV" &
@Middle(CMpkgID;4;4) != "prov" &
@Middle(CMpkgID;4;4) != "WHSE" &
@Middle(CMpkgID;4;4) != "whse" &
@Middle(CMpkgID;4;4) != "THCL" &
@Middle(CMpkgID;4;4) != "thcl");
@Failure("Subsystem is Invalid - Please reenter a valid Subsystem.");
(@Middle(CMpkgID;11;4) != "CICS" &
@Middle(CMpkgID;11;4) != "BTCH" &
@Middle(CMpkgID;11;4) != "JOBS" &
@Middle(CMpkgID;11;4) != "cics" &
@Middle(CMpkgID;11;4) != "btch" &
@Middle(CMpkgID;11;4) != "jobs" &
@Middle(CMpkgID;11;4) != "EMED" &
@Middle(CMpkgID;11;4) != "emed" &
@Middle(CMpkgID;11;4) != "TKDW" &
@Middle(CMpkgID;11;4) != "tkdw" &
@Middle(CMpkgID;11;4) != "TKPS" &
@Middle(CMpkgID;11;4) != "tkps" &
@Middle(CMpkgID;11;4) != "TKPO" &
@Middle(CMpkgID;11;4) != "tkpo" &
@Middle(CMpkgID;11;4) != "OFLD" &
@Middle(CMpkgID;11;4) != "ofld" &
@Middle(CMpkgID;11;4) != "OJBM" &
@Middle(CMpkgID;11;4) != "ojbm" &
@Middle(CMpkgID;11;4) != "OARU" &
@Middle(CMpkgID;11;4) != "oaru" &
@Middle(CMpkgID;11;4) != "OFTP" &
@Middle(CMpkgID;11;4) != "oftp" &
@Middle(CMpkgID;11;4) != "CPYS" &
@Middle(CMpkgID;11;4) != "cpys" &
@Middle(CMpkgID;11;4) != "OPOS" &
@Middle(CMpkgID;11;4) != "opos");
@Failure("Package ID Suffix is Invalid - Please reenter valid pkg suffix.");
@IsNewDoc & !@IsError(@DbLookup("Notes":"NoCache";"";"CMxref";CMpkgID;"CMpkgID"));@Failure("Package ID Already exists.... Please reenter a unique Package ID.");
@Success)
0
Comment
Question by:pratigan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 4
  • 2
  • +2
17 Comments
 
LVL 9

Expert Comment

by:Arunkumar
ID: 8121420
Probably you are doing a save that refreshes the document again ? Check if you have someother validation somewhere on something else.

-Arun.
0
 
LVL 4

Author Comment

by:pratigan
ID: 8122191
HEllo Arun,
I am doing a refresh in the event Querysave and then again in Postsave.  Not sure why I had that in there... I'll have to test the logic to see why that was in there.
Thank you !
I'll let you know how I make out....
0
 
LVL 7

Expert Comment

by:scottrma
ID: 8122465
That's just what Notes does. First it displays whatever message you put in your @Failure() call, then it displays the "Notes error: field didn't pass validation formula" message and then it puts the focus (cursor) into the field that failed validation. This is normal behavior of Notes and there is nothing wrong about your formula if that is the only problem you're getting.

Regards,

Scott
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 63

Accepted Solution

by:
Zvonko earned 200 total points
ID: 8123229
Try this InputValidation formula:


Stage:=@Middle(CMpkgID;3;1);
Subsystem:=@UpperCase(@Middle(CMpkgID;4;4));
PackageIDSuffix:=@UpperCase(@Middle(CMpkgID;11;4));
@If(
CMpkgID = "";
  @Failure("Package ID is required.");
@IsNotMember("2":"3":"4";Stage);
  @Failure("Please reenter valid Stage i.e. 2,3 or 4. This Package Stage is Invalid: "+Stage);
@IsNotMember("REFR":"CLMS":"ECOM":"CLNT":"CONV":"MULT":"PAUT":"PBWR":"PROW":"WHSE":"THCL";Subsystem);
  @Failure("Please reenter a valid Subsystem. This Subsystem is Invalid: "+Subsystem);
@IsNotMember("CICS": "BTCH":"JOBS":"EMED":"TKDW":"TKPS":"TKPO":"OFLD":"OJBM": "OARU":"OFTP":"CPYS":"OPOS";PackageIDSuffix);
  @Failure("Please reenter valid pkg suffix. This Package ID Suffix is Invalid: "+PackageIDSuffix);
@IsNewDoc & !@IsError(@DbLookup("Notes":"NoCache";"";"CMxref";CMpkgID;"CMpkgID"));
  @Failure("Package ID Already exists.... Please reenter a unique Package ID.");
  @Success
)



Good luck,
Zvonko

0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 8127479
Alright guys!  Give some solution to Paul, and we will share the points.

:)
0
 
LVL 4

Author Comment

by:pratigan
ID: 8127811
Hello Zvonko,
Your validation formula is much more refined than mine was.  I am definitely going to be testing this way.  I will get back to you all soon with my test results.  Thank You much for your input.
:)
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 8127853
Oh, you are welcome :-)

And keep some spare points for our joker :)

0
 
LVL 4

Author Comment

by:pratigan
ID: 8127893
HAHAHAHA... you got it !!
0
 
LVL 4

Author Comment

by:pratigan
ID: 8130358
Gentlemen,
The new formula form Zvonko works like a charm.  I am still getting the 2nd notes error pop up.  If this is true what scott says then there's nothing left to do but assign points..
0
 
LVL 13

Expert Comment

by:CRAK
ID: 8131395
Poor Arun.... you promised him.....
Well done Zvo! What a relief a simple @Uppercase can bring...  ;-))
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 8132108
It is not for this 50 points, but now I am not sure.
I can remember the scenario like Scott tells, but in my test does this final error message not appear.

Perhaps it depends on your QuerySave code. I do not use any QuerySave code so this second message is not coming. I get only the appropriate @Failure message.

What is your QuerySave code?

0
 
LVL 7

Expert Comment

by:scottrma
ID: 8133211
I think perhaps it depends on your version of Notes. I know for sure that in R4 you get the 2nd popup, I think in R5 you don't, and I'm not sure about R6.

Regards,

Scott
0
 
LVL 4

Author Comment

by:pratigan
ID: 8135895
Hello Zvonko / Scott,
I am using R5, the querysave code performs a document refresh. looks like this.
Sub Querysave(Source As Notesuidocument, Continue As Variant)
     Dim workspace As New NotesUIWorkspace
     Dim uidoc As NotesUIDocument
     Set uidoc = workspace.CurrentDocument
     Call uidoc.Refresh
End Sub

I had to place this code to refresh the document befroe closing it in order to validate the fields on the form.  I had to remove auto refresh fields as that was killing the response time.  I also have this same refresh logic on the field just after the messages from the 2 fields, I have the refresh on entering the next field in order to validate the pkgid formulas.
Was not sure of any other way to do this without having the refreshes setup like that.
That's probably what's causing it. !?!?!?!
:-?
0
 
LVL 4

Author Comment

by:pratigan
ID: 8239941
Hello Gentlemen,
When I remove the queryclose refresh, I no longer get the 2nd message.  I will have to live with this as I need to have the queryclose refresh to resolve field populating formulas. I cannot use auto refresh fields as the form is large and alot of formulas that drag the response time dwn, that is why I placed the refresh in a queryclose event.  Thank you all for your help.

0
 
LVL 4

Author Comment

by:pratigan
ID: 8239948
Hello Zvonko,
I granted you the points, not just for the formula rewrite but also for a followup to the querysave.  
I know, I know Arun... you had input as well.. I will be posting a question for your points as well.
Thank You Much !!
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 8240736
Thanks for the points :-)

And please note that Arun is out of town for some while, but will be back in May.

0
 
LVL 4

Author Comment

by:pratigan
ID: 8242929
Ok.. Thank You for the update.  I have posted a question for him for his points.  Wouldn't want him to feel left out. You know him and his points. lol.
<:-)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question