Solved

Character count in notes client

Posted on 2003-11-17
3
865 Views
Last Modified: 2013-12-18
Hi,
  I am new to lotus notes. we are developing a mobile application in lotus notes. I want to implement character counter in  notes client. That is as and when the user types I want to show him the number of characters he has typed dynamically. How can I implement this. This is the most important requirement and I have no escape. I know it is possible in web client. But I want to do this in notes client. I have seen the similar functionality in domino designer that is as and when I type the code it shows the column and row count. Are there atleast any DLL's to do this using C API if not lotusscript or formula language.This is urgent. Experts please help.

I will tell you how I have impletented it now I have included the following code in onBlur and onFocus events:
var CharacterCount=0;
CharacterCount += RtBody.value.length;
var NumMsgs = 1;
if (CharacterCount > 160 )
{
NumMsgs =CharacterCount / 160;
NumMsgs=NumMsgs+1;
}
window.status="Charater Counter     "+CharacterCount +"(" + parseInt(NumMsgs) +")";

But this does not serve my purpose.
Any quick exact help will be very greatful

Thanks in advance.
rishi.
0
Comment
Question by:rishi_vino
3 Comments
 
LVL 19

Expert Comment

by:madheeswar
ID: 9769481
As per I know its not going to be an easy task. And may not possible also.

Anyway I will check is thier anything possible in any method.

Wait for other experts.
0
 

Author Comment

by:rishi_vino
ID: 9769774
Thanks for your quick response

0
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 100 total points
ID: 9769812
It seems to me that you are going to transfer data over an SMS service. Without a proper protocol this is a dangerous thing, since how would you know that you missed some packets? But that's for you to think about. I hope you are going to use some of-the-shelf software for datacommunication.

I never managed to get onBlur and onFocus properly working in the Notes-client, but if they work that's great. Probably best is to do this with a NotesTimer, or a setTimeout in JavaScript although I don't know if the latter can be used in the Notes client.

In LotusScript (untested):

In a global declarations section:
   Dim nt As NotesTimer
   Dim counter As NotesItem
   Dim uidoc As NotesUIDocument

In the PostOpen:
   Set counter= Source.Document.getfirstitem("CharacterCount") ' put the name of the field in here
   Set uidoc= Source ' make source global
   Set nt= New NotesTimer(1) ' one second interval
   On Event Alarm From nt Call UpdateCount

Define a sub:
Sub UpdateCount(src As NotesTimer)
   Call counter.replaceitemvalue(Len(uidoc.fieldgettext("Body"))) ' hope this works...
End Sub
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

863 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now