i need to pop up an alert using a trigger to test the data type of a field per example if the input is not a number an alert will popup "Please insert a number"
i have a text field where i am putting values from an LOV and i want to check for wrong entries like if the user enters a wrong code it should display the message "wrong code".so this is the code i am using in the when validate item trigger:
begin declare pc number; begin select count(*)
[code]...
But it doesn;t work, it acepts the wrong code also.
I am trying to write a procedure using when-validate-record that will clear all fields, display a message and ignore all commits if user is not authorized to have access to make changes to the form.
I have tried to use Clear_form(no_validate)and clear_record and neither works
I want to execute a db trigger once for updation of more than one record on a single primary key. The updation would be made by a 10g form by using the common tabular data block.
I am trying to make a particular field (called reason_code) "required" on a form I am working on. Now this field has two fields before it, and I have to tab to reach my reason_code field.
But the functionality I want is that when I tab into the reason_code field, the WHEN-VALIDATE-ITEM trigger should fire even when this field is NULL.
IF :REASON_CODE IS NULL THEN MESSAGE ("Please enter a reason code!"); end if;
The trigger doesn't fire when I don't enter a reason_code field and I can tab past this field and not get the ("Please enter a reason code!") error message.
On researching the problem, I saw that this field has to be of status "CHANGED" in order for the trigger to fire.
I have a form (StaffDetail) with three different blcoks. One of them is an Application Assignment block which consists of nothing but Assignment Type, Staff (Name), Last Updated By and Last Updated Date.. The Assignment Type and Staff has LOVs assigned to them individually.. Assignment type lets me pick all different types except for Project Manager. As soon as I select this option, i get the following error :
This does not even let me select any other Assignment type, then i have to go close all sessions and come back into the same screen.
Also, this form was first created and tested on the development environment and later moved to QA environment. All selections work in the development environment.. I checked for the roles in QA for individual Users..
I have Written this code in WHEN-VALIDATE-ITEM-TRIGGER on PO_DATE field
if not( :PO_HEADER.PO_DATE IS NOT NULL ) then :po_header.po_date := trunc(sysdate); end if; if trunc(:PO_HEADER.PO_DATE)>trunc(sysdate) then displayerror.errmsg('PO date cannot be future date!');
[code]...
when i am navigating through po_DATE field in the form its showing the error that
i put a new column which is the birth date and i made a new procedure with regards to the age level for the Plan. and when i run the program, theres an error..
I want to write a trigger to validate the v_status for each ID. below is the example
SEQ_NO ID V_STATUS
11 C 21 C 31 F 42 C 52 F 63 C 7 3 F 8 3 C
For each unique id there will be only one F .. if some one tries to update the 2nd F to the same ID it will show the error message that ID is already F.
I have to update Order_id with some 8 digit number generated by some algorithm. And i have to update that value in child tables as well. In how many ways i can do this task. for example..
1) Disabling the constraint and updating Master value and child value.
i have a table called equipment containing engine_type_id.in the equipment form that is based on the equipment table, i added a non database item called engine_type.
i added an LOV for the engine type field, so that the user can choose the engine type from the the egine types table. i made the engine type id hidden. and set the validate item from LOV to yes.on post query trigger, i selected the engine type into the nondatabase field.
the form is working properly.
when i push CTRL F11 (query) and scroll, even if i didnt change anything the form builder asks me , do u want to save changes.
I have a non-database text item (name: profession_temp) on a block and it is a also return item for an lov.
When I change the property "validate from list" of the item(name: profession_temp), to YES, and closing the form without inserting, updating, deleting any record , a message is displayed "do you want to save the changes?".
When I change the above property back to "No", the message is not displayed in this case. I wonder why this message appears while there is no change occurred in the underlying records?
I have a issue in updation of data from CLOB to BLOB.
create or replace function CLOB_TO_BLOB (p_clob CLOB) return BLOB as l_blob blob; l_dest_offset integer := 1; l_source_offset integer := 1; l_lang_context integer := DBMS_LOB.DEFAULT_LANG_CTX; [code]........
ERROR at line 1: ORA-06502: PL/SQL: numeric or value error: invalid LOB locator specified: ORA-22275 ORA-06512: at "SYS.DBMS_LOB", line 696 ORA-06512: at "SYSADM.CLOB_TO_BLOB", line 11 ORA-06512: at line 6
I have developed a form with some text items,a list item and a image item...
list item......account_list(values....company,individual) text_item..... company_name.. text_item.....image_path...
i have attached a pop up menu to image item... Add image and upload image...
When i click on 'Add image' the image path is getting enabled.. it is fine but when i am changing the account_list i need enable and disable the 'Company_name' text item... How can i achieve this??
I have tried it in when-validate-trigger on account_list...
if account_list=individual then set_item_property('company_name',enabled,property_false); else set_item_property('company_name',enabled,property_true); end if;
i have a emp block with multiple rows in which col1,col2,col3,col4,col5,col6 are the columns...In emp block col1,col2,col3 are the primary key fields.. i need to validate the primary key columns such that it should not allow duplicates values in the primary key col's with out checking the database values with out using enforce primary key property
how to Validate after write every character in textitem to do event ?
exmple :
to make filter on lov from this textitem
when write M ---> lov list all name start with M when write O ---> lov list all name start with MO when write H ---> lov list all name start with MOH os ....
I have a varchar field and user will enter the time in that field as per the format HH:MI HOURS:MINUTES.Actually there is no control on this field and user is making mistakes like instead of HH:MI he is entering HH;MI.
I have a created data block using employees table so am trying to validate item salary using max_salary and min_salary from table jobs how to do this kind of validation.
[How can i validate input number into a Field of type char in oracle form?]
Suppose if I have defined two triggers Key-next and When-validate-item on the same item.
If my key-next is going to fire first and When-validate-item laterhow can the validation happen if I write a code like go_item('XXXX') in my Key-next.Does it mean that if u write a code in key-next to jump to some other item, no validation takes pLace?
I wrote function Quantity(p_item_number in varchar2)RETURN NUMBER, i called This function in POST_QUERY ,Error like this "wrong number or type of arguments in call to Quantity", i tried like as " Quantity(p_item_number in varchar2)RETURN NUMBER" , but it gives an error "encounterd the symbol VARCHAR2 when expecting one of the following ( "..
This is my first post in the form and also i'm new to oracle forms technology.
I have the following issue:
In my form i have two Text-Fields to store some information for a claim:
A --> Profit and B --> Loss (only one of the filed can have value)
Also i have a data block where i store the reason of the claim (status). Reason can take three values 1, 2, 3. For each claim i can have more than one reasons stored in db table.
if the user input more than one reasons, then if one of them is 1 Profit should be set unprotected and Loss should be set to protected.
I have the following issue.
user creates a records with reason 1 : Profit text field is set to unprotected and Loss text filed is set protected.
user creates another record with reason 2: Profit text field is set to Protected and Loss text filed is set to unprotected. --> wrong
How can i validate the values of the two records and create the desired functionality?
I have used the POST-TEXT-ITEM trigger but it works correct only for one record. i insert two records with the above order i have the issue i describe.
I have created a form that have a button to check the character in the textbox is alphanumeric and symbol. Here attached the code, that i tried from other post.
if we update partition key, internally row movement is done as if you had in fact deleted the row and reinserted it. It will update every single index on this table, and delete the old entry and insert a new one. It will do the physical work of a DELETE plus an INSERT. However, it is considered an update by Oracle even though it physically deletes and inserts the row¿therefore, it won't cause INSERT and DELETE triggers to fire, just the UPDATE triggers. Additionally, child tables that might prevent a DELETE due to a foreign key constraint won¿t. You do have to be prepared, however, for the extra work that will be performed; it is much more expensive than a normal UPDATE.
In above I inserted few rows into table and those belong to partition P1 and Tablespace DJB and then I updated partition key from A to B which resulted row movement from partition P1 to P2 which belong to tablespace users. Before updation data has consumed some space in tablespace DJB and after update those records consumed some space in tablespace USERS. But in this scenario I checked that space consumed in DJB is not released. Is there any way to get this space released ?
I have to create a form and i have to use trigger when-validate-item in enter-query mode . I have read trigger when-validate-item can not use Enter Query Mode . Is there any way to do this when i enter-query?