Home » Developer & Programmer » Forms » Help require in given scenario (Forms 6i, Application server 10g)
Help require in given scenario [message #388470] Tue, 24 February 2009 23:51 Go to next message
sirfkashif
Messages: 70
Registered: September 2007
Location: Rawalpindi
Member
Dear all,
I have a editor attached with a text box and i want to restrict user from using "Enter" button so that user enter data without hitting "Enter".

Urgent help is required, so any hint or help will be appreciated.

Regards,
Kashif
Re: Help require in given scenario [message #388712 is a reply to message #388470] Thu, 26 February 2009 00:15 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I assume the problem is that the user is pressing 'Enter' while they have the 'edit' window open and the resulting text is causing problems when you export it to other applications.

I suggest you determine exactly which codes are being stored in the text. Probably a CHR(13) or CHR(10) or something similar.

In the 'When-Validate-Item' trigger on this item do an INSTR, find if there are any 'Enter' characters and then do either a 'substr' to remove that character or a 'replace' or a 'translate' to replace it with a space.

David
Re: Help require in given scenario [message #388739 is a reply to message #388470] Thu, 26 February 2009 00:57 Go to previous messageGo to next message
sirfkashif
Messages: 70
Registered: September 2007
Location: Rawalpindi
Member
Dear Djmartin,
Thanks for reply. Actually the problem was that when i export that data into excel then that user pressed "Enter" on runtime editor comes into play and would create new excel cells in short excel converted report was a disaster but now i wrote the following code on post-insert trigger
update table t
set t.comments = replace(t.comments,chr(10),chr(32))
where t.table_id = :table1.table_id;


so if user even pressed "enter" on the editor

before commit all "Enter" will be replaced by "Space".

And it worked for me.

Regards,
Kashif

Re: Help require in given scenario [message #388741 is a reply to message #388739] Thu, 26 February 2009 01:00 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Couldn't you do the same thing just on the current item in the 'Pre-Insert' or 'When-Validate-Item' triggers? That way, the data is 'cleaned' BEFORE it gets to the database!

David
Re: Help require in given scenario [message #388750 is a reply to message #388470] Thu, 26 February 2009 01:27 Go to previous message
sirfkashif
Messages: 70
Registered: September 2007
Location: Rawalpindi
Member
Ohhh yes i should have done that and i will do that.

Thanks for your kind reply

Regards,
Kashif
Previous Topic: Mouse Scroll on image item
Next Topic: unable to execute form in form builder 6i
Goto Forum:
  


Current Time: Sun Feb 09 11:22:57 CST 2025