Problem using when-validate-trigger
Dear Experts,
After validating a item value, I want to navigate to a specified item besed on that item value. If i use go_item('item1') in when-validate-trigger, error comes, beacuse we cannot use restricted built-in go_item in when-validate-trigger. If i use key-next-item on 'item1' for validating item value then while navigating through mouse it does'nt fire.
Please let me know which triiger i should use?
Thanks
Abhishek Rustagi
There is no easy way to do this, however you could create a timer in your when-validate-item trigger which expires immediately, and place all of your navigational code in the when-timer-expired trigger - this way you could check the value which has been entered and navigate accordingly.
Similar Messages
-
Problem with when validate trigger
Hi All,
I am using oracle forms 10g.
I have developed a custom form In that i have two block Header block and Detail block.In the header block some fields like Po number, po amount , supplier name, supplier site etc. And in the detail block i have po line details.
I have written a validation trigger under supplier name and supplier site, IF block.supplier_name is null then
message('enter supplier name') same under every field.
Now when the user enter po number it will go to po amount field and now when the user press tab it will go to the details block and query all the po related line,so i have written key-next under po_amount go-block and my code, Its works fine and giving the correct output. But the problem is When validate trigger fires when i press tab in PO Amount fields, Once i press ok it going to details block and querying.
Can any one explain me what i have done wrong. The validation trigger is firing and giving message.
Regards
SrikkanthSrikkanth.M wrote:
Hi All,
I am using oracle forms 10g.
I have developed a custom form In that i have two block Header block and Detail block.In the header block some fields like Po number, po amount , supplier name, supplier site etc. And in the detail block i have po line details.
I have written a validation trigger under supplier name and supplier site, IF block.supplier_name is null then
message('enter supplier name') same under every field.
Now when the user enter po number it will go to po amount field and now when the user press tab it will go to the details block and query all the po related line,so i have written key-next under po_amount go-block and my code, Its works fine and giving the correct output. But the problem is When validate trigger fires when i press tab in PO Amount fields, Once i press ok it going to details block and querying.Hey, Srikkanth
Once you said
when the user enter po number it will go to po amount field and now when the user press tab it will go to the details block and query all the po related line,so i have written key-next under po_amount go-block and my code, Its works fine and giving the correct output.again you said
But the problem is When validate trigger fires when i press tab in PO Amount fieldsSo, i'm not getting you..
Can you clear it any more ? or any other way.. -
Problem in using when-validate-trigger
Dear Experts,
After validating a item value, I want to navigate to a specified item besed on that item value. If i use go_item('item1') in when-validate-trigger, error comes, beacuse we cannot use restricted built-in go_item in when-validate-trigger. If i use key-next-item on 'item1' for validating item value then while navigating through mouse it does'nt fire.
Please let me know which triiger i should use?
Thanks
Abhishek RustagiHi, the way I use to solve this problem is using both: key-next-item and when-validate-item. In the w-v-i you make the validations you need (this control mouse navigation) and in the k-n-i code write:
-- first validate the values, to avoid invalid values
execute_trigger ('when-validate-item');
-- if trigger fire corectly then you can go to the item you want..
if my_item = 'A' then
go_item(my_next_item1);
elsif my_item = 'B' then
go_item(my_next_item2);
end if;
Ruben. -
How to use when-validate-item in the form personalization?
Dear all,
I want to use when-validate-item trigger in the form personalization on a specific item. while in the same time the when-validate-item is not included in the trigger event list.
Please advice & Thanks in advance
Ashraf AshourUse condition. If you are validating a record, just out the desired check in the condition field for that specific item.
Thanks
Nagamohan -
When validate trigger block level
Hi,
I Have a form application. On the entrance page If a user forget to enter his name or Password the form prompt the message to aware him about what is missing.
SO I wrote the folloing code on when validate trigger block level, but it did not work according to my needs, should I replace this trigger with other?
Sharbat
BEGIN
if:Block1.User is null then
message('Please enter the user name);
raise form_trigger_failure;
if:Block1.password is null then
message('Please enter the password'););
raise form_trigger_failure;
end if;
end if;
end;use
if:Block1.User is null then
message('Please enter the user name);
raise form_trigger_failure;
end if;
on key-next-item of user textbox
and
if:Block1.password is null then
message('Please enter the password'););
raise form_trigger_failure;
end if;
on the key-next-item of the password text box -
WHEN-VALIDATE-TRIGGER trigger looping so many times
Hi,
Below is the code written in WHEN-VALIDATE-TRIGGER trigger and after raise FORM-TRIGGER_FAILURE
the process is not stopping and the trigger message looping without end when
I tab to the next field or try to save the record. I am not sure why the flow did not stop
after the raise FORM_TRIGGER_FAILURE exception and the trigger looping again and again.
Please help me to know what is wrong in the code. This trigger written in ITEM level.
declare
msg_type varchar2(3);
msg_text varchar2(2000);
continue boolean;
begin
if :pom1_b22.qty < 0 then
message_ppkg.get_msg_from_db('RET','04060',msg_type,msg_text);
message(msg_text || '.');
bell;
raise form_trigger_failure;
else
continue := TRUE;
if :pom1_b22.qty is not null and :pom1_b22a.b22_query = 'FALSE' then
if nvl(:pom1_b22.irt_created,'N') = 'Y' then
if :pom1_b22.qty <> :pom1_b22.save_qty and
:pom1_b22.save_qty is not null then
if check_order_status then
continue := TRUE;
else
continue := FALSE;
message_ppkg.get_msg_from_db('RET','04061',msg_type,msg_text);
message(msg_text);
bell;
:pom1_b22.qty := :pom1_b22.save_qty;
raise form_trigger_failure;
end if;
end if;
end if;
if continue then
if :pom1_b22.save_qty is null then
if :pom1_b22.qty > :pom1_b22a.total_qty then
message_ppkg.get_msg_from_db('RET','04057',msg_type,msg_text);
message(msg_text || to_char(:pom1_b22a.total_qty) || '.');
bell;
raise form_trigger_failure;
end if;
else
if :pom1_b22.qty <> nvl(:pom1_b22.save_qty,0) then
if :pom1_b22.qty > :pom1_b22a.total_qty +
(nvl(:pom1_b22.save_qty,0) -
:pom1_b22.qty) then
message_ppkg.get_msg_from_db('RET','04056',msg_type,msg_text);
message(msg_text || to_char(:pom1_b22a.total_qty +
(nvl(:pom1_b22.save_qty,0) -
:pom1_b22.qty)));
bell;
raise form_trigger_failure;
end if;
end if;
end if;
end if;
end if;
end if;
end;Your Raise form_Trigger_failure Condition is not met hence not stopping the rest trigger body.
-
When validate trigger forms 6i
Please help me to create when validate item trigger.
There is one table "job" - id, status
status is X or null. i want to do in forms. when someone is entering value for id, it should check first the status for that id in job table status field.
if status is null then it should show msg "this id is already open for another job"
Edited by: only.ashish99 on Dec 26, 2012 1:44 PMHi,
So You mean that if the user dosent enter the staus then u need to show a message and if the entered status is there in ur table and then u need to show a message.
Just write in the when validate trigger
declare
v_status number;
begin
select count(status) into v_status from table;
If :Block.field_name is null then
message('');
Else
If v_status=0 then
ur action
else
Message('this job is exist for another');
End if;
end if;
End;
Try this.
Regards
Sri -
Issue with When Validate Trigger firing multiple times
Hi guys,
I have Designed a Form Personalization on a Form which Fires a concurrent Program (built in:execute Procedure) when a Record is Saved.
Below are the issues I am facing:
1.Concurrent Program is Firing Multiple Times after Saving the Record.
2.2 input Values to Concurrent Program are passed as NULL though I have Data but they are in Different Block of Form.
Note :I have When Validate trigger on 1 Block but i am trying to pass 2 Values on Another Block as input parameters for Concurrent program.But those values are getting as null when program fires.
Thanks.If EBS then post in {forum:id=475}
-
Restricting User from creating new records using when-validate-record
Hi,
I have a requirement for which I have to restrict he user from creating a record in the Supplier Master form if the suppliier type is 'Affiliate Supplier'.
I have done the following setups
Seq 10
Description Restricting user from creating Affiliate records
Level Function
Enabled Yes
Condition:
Trigger Event WHEN-VALIDATE-RECORD
Trigger object VNDR
Condition "${item.VNDR.VENDOR_TYPE_DISP_MIR.value} is NOT NULL
and
${item.VNDR.VENDOR_TYPE_DISP_MIR.value} LIKE 'Affiliate%'
Processing Mode BOTH
Context
Level User
Value User Name
Action Sequence 1
Type Message
Action Description Saving Affiliate record
Language ALL
Message Type Show
Message Text You Cannot Create Affiliate records Here
Action Sequence 2
Type Builtin
Action Description Stop Proceesing
Language ALL
Action Enabled Yes
Builtin Type RAISE FORM_TRIGGER_FAILURE;
This is working good on one instance but when I moved it to another instance
when I query the form and try to navigate to the bank accounts tab of the form which is based on a differnt block i.e VNDR_USES block, the when-validate-record trigger fires there also and stops the processing.
Any suggestions on this would be higly appriciated.
Thanks in Advance.Hi Srini,
Yes, it does work...but in a Form Session if i Create more then one Item, in some cases it fires for the first records and not sleeps for the second.
Sometimes it doesn't give any response.
Appreciated if you divert to the link to check the Pacthes for 11.5.10 on Form Personalization.
Please share any ideas/example if yiou have to achieve the below requirement.
Requirement:
Once New record is created , a Custom Procedure should be invoked.
with out closing Form i am able to create n number of Items, so for every Item it should invoke Custom PLSQL Code on Save.
Let me know if i can achieve the same in Custom.pll .....as i can use either of Options.(Form Personalization/Custom.pll)
Thanks & regards,
Edited by: user632004 on Mar 16, 2010 7:50 PM
Edited by: user632004 on Mar 16, 2010 8:09 PM -
How to invoke when-validate trigger
Hi all ,
I just want to know how can i Invoke when-validate-item trigger of another item by without navigating to that item.
Exampls. I have two items A and B
I want to invoke item B's when-validate-item trigger by keeping the focus on A or being in A .first: write procedures for each when-validate.
e.g. WVI_name_of_the_item_A and WVI_name_of_the_item_B
then you start this procedure in item A and the other in item B.
now you can use the validation-procedure of B inside the validation of A
try it
Gerd -
Form personlization using WHEN-VALIDATE-RECORD to call PLSQL Package
Hi
I am writing a Form Personalization on master Item Form for New Records Only.
Once Item Is defined and saved, it should Invoke the Custom Procedure to insert the same record in Custom Table.
===========
Trigger Event - WHEN-VALIDATE-RECORD
Trigger Block:MTL_SYSTEM_ITEMS
Condition: :MTL_SYSTEM_ITEMS.INVENTORY_ITEM_ID<>-1 AND 0=(SELECT COUNT(inventory_item_id ) FROM Custom table
WHERE inventory_item_id = :MTL_SYSTEM_ITEMS.inventory_item_id
AND Organization_id=:MTL_SYSTEM_ITEMS.organization_id )
ACTION
Built In type = Execute Procedure
Argument = ='DECLARE
v_field_value VARCHAR2(200);
BEGIN
UPDATE_CUSTOM('''||${item.MTL_SYSTEM_ITEMS.ORGANIZATION_ID.Value}||''','''||${item.MTL_SYSTEM_ITEMS.INVENTORY_ITEM_ID.Value}||''');
END'
============
Here its not firing as required for evey required.
Please advice.
Thanks in advance.Hi Srini,
Yes, it does work...but in a Form Session if i Create more then one Item, in some cases it fires for the first records and not sleeps for the second.
Sometimes it doesn't give any response.
Appreciated if you divert to the link to check the Pacthes for 11.5.10 on Form Personalization.
Please share any ideas/example if yiou have to achieve the below requirement.
Requirement:
Once New record is created , a Custom Procedure should be invoked.
with out closing Form i am able to create n number of Items, so for every Item it should invoke Custom PLSQL Code on Save.
Let me know if i can achieve the same in Custom.pll .....as i can use either of Options.(Form Personalization/Custom.pll)
Thanks & regards,
Edited by: user632004 on Mar 16, 2010 7:50 PM
Edited by: user632004 on Mar 16, 2010 8:09 PM -
Hi All
I want message('please check the order');
and my code is
DECLARE
a VARCHAR2(200);
b varchar2(200);
BEGIN
select s.sale_order_no||sd.prod_id||sd.color,s.PERFORMA_TYPE INTO a,b from sale_order s,sale_order_detail sd
where s.id=sd.id and s.sale_order_no||sd.prod_id||sd.color=:gin_detail1.barcode and s.PERFORMA_TYPE!='ORDER CANCEL';
IF :gin_detail1.barcode = a THEN
SELECT SALE_ORDER_NO,prod_id,style,color,xs,s,m,l,xl,pcs INTO :gin_detail1.sale_order_id,:gin_detail1.prod_id,
:gin_detail1.prod_name,:gin_detail1.color,:gin_detail1.xs,:gin_detail1.s,:gin_detail1.m,:gin_detail1.l,
:gin_detail1.xl,:gin_detail1.pcs from sale_order_barcode where barcode=:gin_detail1.barcode;
ELSE
message('please check the order');
end if;
end;when-validate-item trigger raised unhandeled exception ora-01403
Thanks And Regards
Vikas SinghalHi,
Probably your first select statement itself throwing the error - ora-01403
So may be try to include an exception part for your code, to catch the exception ora-01403 -no data found
and there display the messgae- 'Please check the Order'.
Hope it will work then -
When Validate Trigger is getting executed when Execute_query
i have a data block in which i have 2 text item. i have defined when validate item.
when the form is starting up i have given execute_query. before fetching the values my when validate item is getting executed. i dont want to do this. can one help me out in this caseHi,
Can you pls. check any initial value is given or not? Otherwise for quick solution you can declare a parameter upon which when-validate will validate the value. You can change value before and after 'EXECUTE_QUERY' statement. This is not a good idea. -
What trigger to use when wanting to form commit information
Want to commit information from form to database.
Only appears I can use when button push
The on validate record does not facilitate form commit
In previous forms versions used a post update trigger
however this one is not valid/recommended anymore.
THX IN ADVANCEThank you Sanjay for your response. I am currently using When Validate Trigger. It works for all the scenarios except when order line is cancelled.
When line cancelled I should rewrite the order quantity to 0 and save then only DFF's are updating to 0's.
Thanks, -
Problem while handling When-Validate-Record Trigger in Forms 6i
I am using below mention code in when validate trigger and use go block loop in when button pressed. if Check_Date_Range gives RAISE Form_Trigger_Failure error user will enter in a loop. kindly provide me solution for below mention problem.
BEGIN
Check_Date_Range(:Experiment.Start_Date,:Experiment.End_Date);
END;
** The procedure looks like this
PROCEDURE Check_Date_Range( d1 DATE, d2 DATE ) IS
BEGIN
IF d1 > d2 THEN
Message('Your date range ends before it starts!');
RAISE Form_Trigger_Failure;
END IF;
END;You have more chance to find a response if you post into Forms<br>
<br>
Nicolas.
Maybe you are looking for
-
My home butyon is not working...not becauze the version,it's like broken, how can i fix it ? I just bought it 4 months ago. Thanks
-
Media Center s/w may be corrupted
I keep getting the error message: Media Center has stopped capturing data due to low data rate in the TV signal... This cannot be so, as the TV signal is driving three televisions. It the Media Center s/w is the problem, how can I reload it? It cam
-
When I attempt to install Palm Desktop 6.2 by running PalmDesktopWin62.exe everything seems to go fine until the "Configuring Registry" starts. Then I get a Microsoft Windows message that says: "... The wizard was interrupted before Palm desktop by
-
Password reset problem with Password sync and Waveset exception
Hi, We are using IdM 5 SP 5 with password sync installed on ad. Once a user tries to change password by using Ctrl-Alt-Del, password sync intercepts the requests and then invoke an IdM change user password form, but on the log we see the following ex
-
Adobe reader 9 freezes IE 8 tabs
I down loaded the latest version of Adobe Reader 9. When I open a new tab in Internet Explorer 8 and try to close that tab it freezes IE 8 and I have to end the task with Alt-Ctrl-Delete keys. What is wrong with this program?