Home » Developer & Programmer » Forms » count length of a field (Forms,6i,XP)
count length of a field [message #361002] Mon, 24 November 2008 11:15 Go to next message
gozuhair
Messages: 206
Registered: January 2008
Senior Member
Dear All

I have tried to search my requirement in this form but didnt find my desired query.

i have a column name called Chassis_no varchar2(17),My requirement is that when a user input a character into this column then system show and count total no of input character in the bottom of a column or bottom of form (where all form status displayed) ,the reason for writing this counter is that end user know how many characters he has inputed in the field and how many character remaining out of 17 character.


Regards


Zuhair
Re: count length of a field [message #361008 is a reply to message #361002] Mon, 24 November 2008 12:38 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I believe that you'll have to use Java code to do that as Forms itself isn't capable of doing that.
Re: count length of a field [message #361679 is a reply to message #361008] Thu, 27 November 2008 07:03 Go to previous messageGo to next message
mikeverkimpe
Messages: 30
Registered: April 2007
Location: Belgium
Member
I have never tested it myself, but this is a bean that generates an event each time a key is pressed. This could probable be a solution for you ...

http://forms.pjc.bean.over-blog.com/article-15980196.html

Mike.
Re: count length of a field [message #361732 is a reply to message #361002] Thu, 27 November 2008 18:21 Go to previous messageGo to next message
Martin Eysackers
Messages: 80
Registered: October 2005
Location: Belgium
Member
Zuhair,


create a timer
start it in the when-new-item-instance of your field
and have the timer update another field with the length
stop the timer in post-text-item of your field



grtz
Martin
Re: count length of a field [message #361878 is a reply to message #361732] Fri, 28 November 2008 06:08 Go to previous messageGo to next message
gozuhair
Messages: 206
Registered: January 2008
Senior Member
Dear Martin

Thanks for reply,could u please send some sample code.

Regards
Re: count length of a field [message #361941 is a reply to message #361002] Fri, 28 November 2008 11:32 Go to previous messageGo to next message
Martin Eysackers
Messages: 80
Registered: October 2005
Location: Belgium
Member
Zuhair,


you're asking me to write a piece of application
at least have a try yourself
if you are not familiar with timers then search the online help for :

create_timer, find_timer, when-timer-expired, delete_timer and
get_application_property(timer_name)

that should get you started
if you're stuck then post the code you have made so far
and I'll gladly help you out

grtz
Martin
Re: count length of a field [message #361987 is a reply to message #361002] Sat, 29 November 2008 01:47 Go to previous messageGo to next message
mikeverkimpe
Messages: 30
Registered: April 2007
Location: Belgium
Member


I think your application will freeze due to too much timer events occuring if you do it this way. But you can try it.

Mike.
Re: count length of a field [message #361996 is a reply to message #361987] Sat, 29 November 2008 07:22 Go to previous messageGo to next message
Martin Eysackers
Messages: 80
Registered: October 2005
Location: Belgium
Member
I agree, just play around with interval settings
and that's also why it is important to stop the timer as soon as you no longer need it
do this in the post-text-item trigger and to be sure also in the when-timer-expired
in that trigger put something like :
if :system.cursor_item != <your text item for the chassis nr> then
delete_timer......

[Updated on: Sat, 29 November 2008 07:22]

Report message to a moderator

Re: count length of a field [message #362117 is a reply to message #361996] Mon, 01 December 2008 01:34 Go to previous message
gozuhair
Messages: 206
Registered: January 2008
Senior Member
thanks for the reply,i will check it out and give feed back.
Previous Topic: Call_Form
Next Topic: Make a data block read only
Goto Forum:
  


Current Time: Sun Dec 11 00:42:31 CST 2016

Total time taken to generate the page: 0.20424 seconds