On key Press Trigger
Hi,
Im using forms 6i. I have a text item. I want to restrict user to enter only the letter 'A'.
we can acheive this using when-validate-item trigger, but it allows to enter other letters or numbers. the restriction takes place when the item is validated.
what i exactly need is, if the user press any key except 'A' then(while pressing other keys) the validation msg
should come.
i.e, the text item should not allow to enter any letter except 'A'.
what to do?
Thanks in Advance
Sankar
Sankar,
So write in the WHEN-VALIDATE-ITEM trigger,
IF UPPER(:<block_name>.<item_name>) <> 'A' THEN
:<block_name>.<item_name> := NULL;
RAISE FORM_TRIGGER_FAILURE;
END IF;This will clear all characters other than A, a.
Regards,
Manu.
If my response or the response of another was helpful, please mark it accordingly
Similar Messages
-
Key Press Trigger??
is there any trigger that fires and calculates the calue into an item when we press any alphabet or numeric key..
suppose I have three columns
Marks obt
80
Total Marks
100
Percent marks
80.00
I wnat that as soon as i enter any figure (e.g 80 etc.)in the 'marks obt' field the percent marks automaticlaly comes into the 'percent mark' field without pressing the 'Enter key'..
I would be grteful if anyoen could tell me..Hello,
I would propose to create a timer when enter in this field (an destroy it when you leave),
test the value of the field in a WHEN-TIMER-EXPIRE trigger, check if the value is new and calculate, display the new %centage
Fancois -
To trigger event or action on "TAB" key press on web dynpro view
Hi, I need to trigger event on "TAB" key press on web dynpro view , is it possible?How?
Hi Dipak
What Madhu said is correct. Tab key is pre-configured to move cursor from 1 field to next field. we can not create an event on tab key press.
Regards
Gaurav -
How to make 'Key-Enter' trigger (when clicked on enter key)work like 'F8' key?
Hi . I have another question to be asked.
Oracle Forms 6i.
I have a form in which DEFAULT&SMARTBAR is the menu and there are no push buttons.
In the form, there is a 'field' named as 'ID No'. After entering 'ID No' in the field and click on 'Execute Query' button from the 'DEFAULT&SMARTBAR' menu, all the details of that respective 'ID No' gets displayed in all the other fields. Even if i press 'F8' all the fields gets displayed with the values.
But i have a requirement, i.e. after entering 'ID No' and click 'Enter' key , i want all the values to be displayed.
So i created a 'Key-Enter' trigger with the following code:
BEGIN
EXECUTE_QUERY;
END;
But after entering 'ID No' and click 'Enter' key, the values are not getting displayed.
What can i do to make this happen?
Thank You.It depends how your form is created. If your ID item is part of the base table block, you can do this.
On your ID item, create a KEY-NEXT-ITEM trigger:
if :system.mode = 'ENTER-QUERY' then
execute_query;
else
next_item;
end if;
Now
- User clicks on enter query (via smart bar icon or F7).
- User enters ID and clicks <enter> key to execute the query. -
Return Key doesn4t make my defined KEY-ENTER trigger to fire.
I4ve found that the trigger that fires when I press Return is KEY-NEXT-ITEM,but this doesn4t resolve my problem,because the tab key also fires this trigger.
I want to navigate within textitems with the tab key and that when I press return key make an action on the values entered in the items.
mila, PJRYou have to perform key mapping to get the Key-Enter trigger to work.
Open your forms90\fmrweb.res file in a text editor. Find the line:
10 : 0 : "Return" : 27 : "Return"
Change it to:
10 : 0 : "Return" : 75 : "Return"
Save the file and run the form again. The key-enter trigger should then fire when you press the Return key, but not when you press the Tab key. -
Failure of Key-NxtBlk Trigger in Tab Pages
Say, I have 3 blocks, b1, b2 and b3, wherein block b1 and b3 are in a "tab-paged canvas" and block b2 is in a different canvas.
When the control is in the tab-canvas (say in block b1). Upon pressing the Key_NxtBlk, CTRL goes to the third block rather than block b2 (since b1 and b3 are in the same tab page).
Also, as the navigation is not as per the block sequence, the Key-Nxtblk trigger is also not firing.
What should I do to make the procedures written within Key-NxtBlk to fire from the tab-canvas and at the same time, make the system navigate as per block sequence.
Anticipating an Early Solution
Thanking you in advance
Ramnath BalasubramanianDear Bogdan Dincescu,
I cannot set the block navigation style as "Next Block" as every block in within my tab canvas are multi-record blocks with the navigation style as "Change Record". Can you suggest a different solution.
Regards
Ramnath Balasubramanian
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Bogdan Dincescu ([email protected]):
What if you set the block navigation style "Next block"? Then, normally, when pressing TAB/ENTER on the last item of the block, the cursor would move to the next block.
Then, a key-nxt-blk trigger, set at block level, should help.<HR></BLOCKQUOTE>
null -
Key-Others Trigger (Please help!!!)
Hi everybody,
We are trying to restrict the end user from pressing some
'dangerous' keys, i.e clear block, execute query, even the DOWN
key causes us problems in some (1 record) blocks.
I know there is a way to do it using Oracle terminal but it
seems that we need greater degree of flexibility.
I certainly don't want to go to every <KEY> trigger on every
form (block) and put null; statements there. I know from Oracle
Docs that I'm supposed to use the key-others trigger..
So here are my questions:
1.Is there any way to find out which key has been pressed?
2.Can someone post a sample code of a KEY-OTHERS triggers?
3.Is there another way to achieve what we need?
Thanks is advance for any help.
Mike
nullYou have two options.
1) Turn off all keys not wanted. This is what you said
you did not want to do.
2) Tun on all keys you want to use by creating a trigger for
each key. i.e.
trigger KEY-NXTREC trigger KEY-UP
NEXT_RECORD; UP;
Then turn off all keys not explicitly turned on.
trigger KEY-OTHERS
NULL;
ET (guest) wrote:
: Hope that it may be helpful.
: Answer :
: 1. In command line, add debug option so that you may know what
: trigger is executing.
: e.g. runform module= userid= debug=yes
: 2. Sample code for Key-others trigger
: null;
: Rgds,
: ET
: Mike Braude (guest) wrote:
: : Hi everybody,
: : We are trying to restrict the end user from pressing some
: : 'dangerous' keys, i.e clear block, execute query, even the
: DOWN
: : key causes us problems in some (1 record) blocks.
: : I know there is a way to do it using Oracle terminal but it
: : seems that we need greater degree of flexibility.
: : I certainly don't want to go to every <KEY> trigger on every
: : form (block) and put null; statements there. I know from
: Oracle
: : Docs that I'm supposed to use the key-others trigger..
: : So here are my questions:
: : 1.Is there any way to find out which key has been pressed?
: : 2.Can someone post a sample code of a KEY-OTHERS triggers?
: : 3.Is there another way to achieve what we need?
: : Thanks is advance for any help.
: : Mike
null -
good morning to all
i would like to learn how can i fire a key list val trigger? i have a text item and i create a trigger for the text item. i think that when i input something in the text item, the trigger must fire, but nothing happens... can somebody help me please?
thanx very much...1) if you have a key-listval-trigger on the item, you can press F9 (windows) to fire the trigger.
2) if you have a lov which you want to use on the item, then put the name of the lov in the lov-property of the item, check the property "validates against the lov" to true. Now you have an auto-validation for your text-item against the lov
try it
Gerd -
KEY-CLRFRM Trigger at Block Level
Hi
Version - Forms Builder (9.0.4.2.0)
What's the use of KEY-CLRFRM @ block level?
I have requirement where I need to clear all the blocks except one block in the form when press F8 (clear_form). Is this possible.
rgds
shabarHello,
You could create a form-level KEY-CLRBLK trigger, then test what block raised the trigger (:SYSTEM.TRIGGER_BLOCK) in a If ... Endif structure.
Francois -
Function key to execute key-f5 trigger
Dear all,
I have migrated a forms 6i to 10gR1 and I would like to call existing KEY-F5 trigger by pressing a function key (F5) on the keyboard.
How to do that?
I have tried several things with the file fmrweb.res but without any success yet.
Anyone to help me?
Thanks and best regards,
SebastienI found the solution by using key accelerator
Thanks and best regards,
Sebastien -
KEY-DOWN trigger doesnt work on list item
I am trying to avoid the list item to be pulled down using key-down trigger in developer 6i but key-down trigger has no effect. Is it possible to stop list item to pull down when user press down arrow key. I want the list to pull down only through mouse. Please help.
Hi!
May set the Keyboard Navigable and the Mouse Navigate Property to No for your list item,
so no keyboard change is possible.
Regards -
dear all
i want when user press enter key then exit from the form and if
press tab then do some other operation
wiating for quick replydear you
I had to do that before. What I did was use the KEY-NEXT-ITEM
for whatever you want to do with the tab key and put a push-
button EXIT and on this button change its property "Default
Button" to Yes. This property makes that the code you put on
WHEN-BUTTON-PRESSED trigger of this button will fire when you
press enter. For the same block it can only be one button with
this property to yes.
I hope this helps -
Hi All !
I want to clear_form on F5 key press event to do so I have return clear_form(no_validate) on KEY-F5 trigger. But it is not fired when we press F5 key why is it so?
Thanks
Neeraj TyagiKEY-F0, ... KEY-F9 are special triggers and don't match to the hotkeys F1-F10 !
You have to rewrite your terminal file.
If you need F5 in Windows-C/S, then try the trigger KEY-MENU or KEY-BLOCK-MENU, I believe. F6 for example is KEY-CREATE-RECORD, F10 is KEY-COMMIT.
Gerd -
I have created a key-F3 trigger at the form level to respond to the F3 key. The only way that the trigger is invoked is with the shift+ctrl+F3 key.
Is there a way to make the trigger respond to just F3?
Thanks.It depends on what Forms resource file you (and your users) are using.
If you are in web forms, it is fmrusw.res, and you can edit the file using a text editor. If you are using client/server Forms 6i, you need Oracle Terminal to change the file.
But changing the file is not a good idea, because it affects every user using Forms, and every form they use.
If you are using the PC version of the resource file, then the original F3 was a Duplicate Field function. And if that is the case, you can just create a Key-Dup-Item trigger instead of a Key-F3 trigger in your form, and pressing F3 will run whatever code you put into that trigger.
If you are using the Oracle Web Forms version, it appears there is no substitute, so you would need to change the fmrweb.res file. -
I have been pouring through the TLF API docs looking for
events to handle key presses on a TextFlow and I am not finding
anything. I'm sure it's simple, can anyone give me a clue? I'm
looking to detect Ctrl+B, Ctrl+I, etc.. to trigger formatting.The events go to the DisplayObjectContainerController. You
will want to override the processKey event functions to add special
handling. Those are in the protected methods section and are
inherited from a base class.
Maybe you are looking for
-
Operation mapping missing in Interface determination
Hi All, In one of scenario Operation mapping is missing in Interface determination. The message type of the sender and the receiver interface are same ..Is it possible to have a scenario with out operation mapping if the sender and the receiver m
-
Error when using data postion delay
I obtained this error when using data position delay. Can anyone please tell me the reason why I can not configure the delay to be between 0.7 and 0.8. Possible reason(s): Driver Status: (Hex 0xBFFA403F) Unable to configure requested delay property
-
Screen Capture (file format) used to be pdf
Is there a way to change the default file format for a screen capture. The file format in OS 10.3 used to capture as a PDF. Now the format is PNG. I know you can open the file in preview and resave it. I just want to see if there is someway to change
-
I need more window space........not less!
-
Nero "power calibration" stops recording using DVD+R or CD-R
I have problems to record with Mat****a UJ-820S on my unit when using DVD+R or CD-R, but no with DVD-R. Is a new firmware the solution? and in that case, where can i get it? The problem is a "power calibration" with nero that stops the recording. Tha