?
Solved

Display informational message

Posted on 2002-05-30
16
Medium Priority
?
169 Views
Last Modified: 2013-12-18
I have placed an edit on a specific field and have a prompt that tests for the value in that field and displays a warning message if the value is over 100, but allows it, so the user just clicks ok and moves on.  The problem is the message box keeps appearing for every field they tab to.  This is because the form has auto refresh fields turned on.  How do I have this message only appear once upon the initial field change. ??
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
  • 7
  • 7
  • 2
16 Comments
 
LVL 10

Expert Comment

by:zvonko
ID: 7044428
Hello Paul,

you need one more field to save the former value.

For example if your field name is: Hight
then create one more field: OldHight
In Hight field InputTranslation formula use at least this code:
FIELD Hight:=Hight;
FIELD OldHight:=OldHight;
@If(Hight=OldHight;@Return(Hight);"");
@SetField("OldHight";Hight);
@If(@TextToNumber(@Text(Hight))>100;@Prompt([OK];"Hight";"Hight:"+@Text(Hight));"");
Hight

The last line is the returned field value. Also the value inside the @Return() function. Be aware of this.

Good luck,
zvonko

0
 
LVL 9

Accepted Solution

by:
Arunkumar earned 200 total points
ID: 7044601
Zvo Dont complicate !  Its not that complicated !

:-)
Please check out our question i will be posting an interesting request in 10 mins !  thanks buddy!
0
 
LVL 4

Author Comment

by:pratigan
ID: 7044678
Zvonko,
I will attempt what you gave me.  Also Arun, Please let me know when you have posted your interesting request to review.
Thanks !!
Paul
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 4

Author Comment

by:pratigan
ID: 7044697
Sub Exiting(Source As Field)
     Dim workspace As New NotesUIWorkspace
     Dim uidoc As NotesUIDocument
     Set uidoc = workspace.CurrentDocument
     If uidoc.currentfield > 100 Then
          Messagebox "You have entered a Value Greater Than 100 !",,"WARNING !"
     End If
End Sub

I have coded this script under the exiting class, however the if does not test for the current field value.  I have reviewed Zvonko's recommendation and I will be trying that next...
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7044743
Arun is right :)
It works much easier.

Put this into onBlur event of the Field:
if (this.value > 100) alert("You have entered a Value Greater Than 100!")

Cheers,
zvonko

0
 
LVL 4

Author Comment

by:pratigan
ID: 7044772
I have applied Zvonko's recommendations and it works perfect.  I would like to see Arun's interesting request first before closing this quesiton out.
Thanks to both of you for your continued support and feedback.  It is well appreciated.
%:)
0
 
LVL 4

Author Comment

by:pratigan
ID: 7044776
zvonko,
I jst got your message about the onblur.   I will try that as well.  I'll let you know.
Thanks !!
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7044777
which one was the right one: second field or onBlur?

0
 
LVL 10

Expert Comment

by:zvonko
ID: 7044781
we are to fast for EE :)

0
 
LVL 4

Author Comment

by:pratigan
ID: 7044812
HAHA.... definitely too fast for EE.
Both solutions worked great.  Therefore I'm faced with a dilemma.  You both gave me correct solutions.  Therefore, I'll both of you decide whom gets the points.  :))
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7044860
If Arun does not complicate now he can get the points :)

This is the way I would like to have EE: collaborate is the key!

<|:-)

0
 
LVL 10

Expert Comment

by:zvonko
ID: 7044875
Paul, only for your LotusScript code here:
The property uidoc.currentfield returns only the field name.
Even worser: in exiting event it does not return the name of actual field but the name of the field containing the curser after exiting actual field.
To get field value you have to use:
myString = uidoc.FieldGetText( "myFieldName" )

You see?

0
 
LVL 4

Author Comment

by:pratigan
ID: 7044888
ello Zvonko,
I understand what you are saying.  Thank You for the clarification.  I will grant the points to Arun.  Thank You !!
0
 
LVL 4

Author Comment

by:pratigan
ID: 7044891
Arun / Zvonko,
Thank You both for your valued solutions.  Both solutions worked great.  Your both a very valueable resource to me and I appreciate your feedback always !!  Thank Again !!
Paul

I have added the actual onBlur solution here for any followup reference that someone my want upon review of the answer.
 if (this.value > 100) alert(" WARNING ! - You have entered a Value Greater Than 100!")
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7044906
You are welcome :-)

0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7045188
Boyz.... Boyz..... !!!
Please...this is more embarrassing for me...

Zvo !
You are Genius in everything....

For pratigan...here is the link for the new interesting request....
http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=lotusnotes&qid=20296038

Hop over it guys!
-Arun
0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

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…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

650 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