Item Level Validation in Detail Block

Hi Experts,
I have to Block Master and Transaction Block, When I am trying to enter the same item code in my Detail block it is accepting, but want to valid one one record will be there in my Details Block, please help me and send me some usefull code to solve this problem.
S P Mishra

The easy bit would be just a validation displaying the error message in the notification area. For this, one would just loop over the rows in the report for that column, checking each. If an error was found then return false. For displaying the error message under the actual row with the problem, one would have to do this manually. You could possibly do this using a div which has a class containing "display:none" and then manually set the style of the error'ed row in your validation routine. Would be messy but I'd imagine you could get it working.

Similar Messages

  • Adding item level validation to a field

    Hi All,
    I am new to Oracle APEX.
    I have a field named semester_code in my page and I want end user to enter only alphanumeric values. I want to create item level validation using regular expressions, but I don't know what expression to write for this purpose.
    Any help will be highly appreciated.
    Thanks
    Bilal

    Hi,
    Go to the validations section of the application builder (for the application you are working on)
    -> add item level validation
    -> select the field that you are trying to validate
    ->item string comparison
    -> select 'Item specified is alphanumeric' from list
    Chris

  • Item Level Validations on Submit

    Hello guys,
    I would like to use Item level Validations but I have a problem. When I submit the page from a button the Item Level Validations automatically fire, can I not run the item validaitons when a specific button is pressed and not 'on submit'? If so how...
    Thanks in advance
    Spam

    Hi "user502286",
    in APEX 4.0 you have more control if validations (also the built-in one for required) should automatically fire during submit or not than in previous APEX versions. It's all about the two new settings
    -) "Execute Validations" which is available in the "Action When Button Clicked" section of a button and
    -) "Always Execute" for validations
    Please consult the field level help for this attribute to find out how they should be set.
    Hope that helps
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • PO item level validation if create with ref to contract

    Hi
    Pl help me to fulfill the following client requirement:
    When user create the PO with ref to contract , system fetch the all data from the contract to PO at line item level, but in the PO, user is able to change the contract line item rate.
    Now contract line item rate is already fixed with vendor & PO creator should not allowed change this rate.
    Could you provide the any standard configuaration or development to restric the user to chage the PO line item rate if created with ref to contract
    Pl give me replay as soon as possible as it is very urgent
    Rgds
    Nishit

    Hi,
    First you have to create a separate document type which is to be used for creation of PO referring a contract . Than define functional authorisation to buyers going by the menupath -Materials management > Purchasing > Authorisation management > Define function authorisations for buyers-Function Authorizations: Purchase Order. Here enter the field selection key of the new PO document type you created . Than check the box "Display Prices" . Uncheck all other boxes .You can check reference to Contract against possible reference Objects. Than save . Than in the User id enter the User parameter EFB and allocate the aparameter to the user . Also remove other document types of POs except the newly created document type in user authorisations. This will prevent change of price field in the specific document type.
    Dhruba

  • Item Level Validation Not Working As Supposed To...

    Hi All,
    I have an item validation type: SQL(Not Exist) that checks whether the value in the id number field exists in the database when Create button is clicked. If the id number exists in the database then an error message is displayed in line with the field & the transaction doesn't go through; however, when this happens Apply Changes & Delete button appear & Create button dissapear. It's as if the record has already been inserted. I would like this validation to work like the Not Null validations.
    I repeated this process several times without success & now I can't even create a new user or update & delete existing ones - I get the error:
    ORA-06550: line 1, column 7: PLS-00428: an INTO clause is expected in this SELECT statement
    ORA-2015: User ID number already exists in the database.NB:The second message is the one I use whenever there's duplicates so, it's oracle reserved message. Any help is highly appreciated.
    Regards
    Kamo

    The buttons probably have conditions to appear if a certain item is not null. You can set this item to null as part of the validation, e.g.,
    :P1_X := null;
    ...but to do that you'd need to change the validation type to PL/SQL Function Returning Boolean and code the "not exists" logic into the PL/SQL block.
    Scott

  • Why item level validation can only execute function but not procedure?

    Dear all,
    When execute my form, some parameter values will be passed to the text items.
    Those values are the procedure name or function name for that particular item which are already defined in a package and those items are non-database items.
    Suppose a particular item can be validated by a procedure or function. It depends on what value is passed into the program.
    If the item when-item-validation is triggered, that corresponding procedure or function will be executed by calling the following codes A) or B):
    A) EXECUTE IMMEDIATE 'BEGIN' || procedure || '(:1);END;' USING v_value;
    OR B) DBMS_SQL.EXECUTE(...)
    Basically, the form is working fine except 2 blocks which can only accept Function, i.e. only fired the function but cannot fire the procedure. Actually these 2 blocks are similar to the others blocks and they are also non-database blocks.
    I am using Form10g.
    Anyone have idea for that? Thanks for advance.
    Regards.

    You cannot use Execute Immediate in Forms. You have to do that on the server in a stored procedure.
    You should not use DBMS_SQL either. In Forms, you use EXEC_SQL, which is almost the same, except for the error handling. And it is VERY slow, since you make a number of calls to it, plus one for each variable passed.
    Now... if you call a function, it must return a value. If you write code to dynamically call a function, this process must be complex enough to handle the returned value. The same occurs if your procedure that you call has any parameters. If there are no parameters, then it would be simpler.
    If you want dynamic function or procedure processing, then I would suggest you just pass the value being validated plus the table.column name to a server-side stored procedure or package, and do all the processing on the server.
    Good luck... it won't be easy.

  • Item Level Validation

    Hi
    I want to add a validation on one Item which will fire as soon as I exit that field (like POST-TEXT-ITEM) , For Example. I have one Field VND_CD and One Display Field VND_NAME, I Want a Validation on VND_CD field at that too fire as soon as I leave VND_CD field. At VND_CD I want to write , IT should Check VND_MST and fetch VND_NAME from VND_MST and Display in VND_NAME Field.
    Please advise.
    thanks in Advance.

    You should investigate the use of AJAX for this. Lots of posts on forum.
    Gus

  • How to get commerce item level taxAmount,shipTo details and etc?

    Hi ,
    How to get the commereceItem level taxAmount ,shipTo address details,price includes vat or not and discounts.
    Regards,
    Satya.

    Hi SatyaVenkat,
    You can call commerceItem.getShippingGroupRelationships(). It will return a list of commerceItem shippingGroupsRelationships.
    So, with it you will be able to get all commerceItem information, about shippingGroups (that contains shippingAddress), priceInfo (that contais tax and discounts) and so on.
    Hope it helps

  • Item Level Validation - on a page

    I have condition where I have 2 item on a page. One is a check box and another Items is for entering the Number . I have to have a condition where When the Check box item is checked alone the next ITEM should run ITEM not NULL condition. If the Check box is left unchecked its ok for the ITEM to be NULL.

    I have to check the condition for the "other ITEM" not to be NULL when "Check box ITEM" is Checked.
    ITEM 1 - CHECK box
    ITEM 2 - NUMBER
    When ITEM 1 CHECK is CHECKEd
    ITEM 2 should not be null.

  • Item Level & Page Level Validation..

    Hi ,
    What is the difference between Item Level validation & Page Level validation..
    in which sceneario it will be useful.
    Anoo..
    Edited by: Anoo on Dec 16, 2008 5:04 AM

    Hi,
    From the APEX help:
    * Item level validations are specific to a single item.
    * Page level validations do not apply to any single item, but apply to an entire page.
    {code}
    Paulo Vale
    [http://apex-notes.blogspot.com]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Billing block at item level still billing is possible for the item.

    Hi friends,
    I have billing blocks at header and item level. When the block at the header and item  levels are  active no billing takes place, but if the block at header is removed then an item with a billing block is also billed. How do i stop this ? Please suggest.
    Regards,
    Udaynath.

    Rectified. It was wrong copying requirement at the item level.
    Regards,
    Udaynath.

  • Setting check box (in detail block) as (non) updatable...

    Hi,
    I have a master-detail form. The form does execute a query when it opens. Now, according to a condition i want to do the check box(in detail block) as non- updatable.
    I have tried to write the appropriate code in:
    WHEN-NEW-RECORD-INSTANCE(in the master block level)
    WHEN-NEW-ITEM-INSTANCE (in the detail block level)
    POST-QUERY(in the detail block level)
    but it does not work 'perfectly'. I mean that in most cases even one of the above triggers does not execute (for example the 'WHEN-NEW-RECORD-INSTANCE' but only after i click on this new record instance. I mean that after this on this new record the condition is estimated....)
    or
    it does execute but after i click on the checkbox (for example the 'WHEN-NEW-ITEM-INSTANCE').
    The code i tried looks like the following:
    if :block.item=<condition>
    then
      set_item_property ('detail_block.chk_box',updatable,property_false);
    else
    set_item_property ('detail_block.chk_box',updatable,property_true);
    end if;I consider to use the WHEN-CHECKBOX-CHANGED trigger and code which looks like:
    if <condition>=true
    then
        /*i set the value of the checkbox as the opposite of what it is just after the click on it...*/
      if :detail_block.chk_box=0
       then
         :detail_block.chk_box=1;
      else
        :detail_block.chk_box=0;
      end if;
      set_record_property(currect_record,status,query_status);
      set_item_property ('detail_block.chk_box',updatable,property_false);
    end if;The truth is that i do not like very much this code, but is there any alternative...???
    Note: I use Dev6i with patch 12
    Thank you,
    Sim

    I build a little testform based on HR-schema-table DEMO_USERS and switch each second record to be not updateable, works without problems (code from POST-QUERY-trigger):
    DEFAULT_VALUE('1', 'GLOBAL.SWITCH');
    :GLOBAL.SWITCH:=3-:GLOBAL.SWITCH;
    IF :GLOBAL.SWITCH=2 THEN
      SET_ITEM_INSTANCE_PROPERTY('DEMO_USERS.ADMIN_USER', TO_NUMBER(:SYSTEM.TRIGGER_RECORD), UPDATE_ALLOWED, PROPERTY_TRUE);
    ELSE     
      SET_ITEM_INSTANCE_PROPERTY('DEMO_USERS.ADMIN_USER', TO_NUMBER(:SYSTEM.TRIGGER_RECORD), UPDATE_ALLOWED, PROPERTY_FALSE);
    END IF;     Edited by: Andreas Weiden on 31.03.2009 21:24

  • Searching master block based on value in detail block

    I have two blocks on a form. A master block for purchase orders and a detail block for the line items. I need to provide users with the ability to search the purchase orders based on the values entered into the detail block (line items), during the query entry. I am considering to check to see which block the cursor resides by using the :SYSTEM.CURSOR_BLOCK variable, then retrieving the value from the current item and running a query, using that query. The problem is that I am not very familiar with Forms and do not know how to implement my idea. Any ideas?
    null

    I copied you an example from metalink. Hope it will help.
    Doc ID:
    Note:109583.1
    Subject:
    How to query a Master record from a Detail Block
    Type:
    BULLETIN
    Status:
    REVIEWED
    Content Type:
    TEXT/PLAIN
    Creation Date:
    22-MAY-2000
    Last Revision Date:
    03-AUG-2001
    PURPOSE
    ------- To query a master record from a detail record. DESCRIPTION
    =========== The user would like to enter a query criteria in the detail block
    and then query the master record based on the above user input. SOLUTION
    ======== Create the master and detail blocks and the relationship in the usual
    manner. We will consider here the blocks DEPT and EMP based on the
    SCOTT schema. 1. Create a KEY-ENTQRY trigger at the block level of the detail block
    (EMP) and add the following code in it : GO_BLOCK('dept');
    CLEAR_BLOCK(no_commit);
    GO_BLOCK('emp');
    ENTER_QUERY; 2. Create a KEY-EXEQRY trigger for the detail block and add
    this : EXECUTE_QUERY;
    :global.deptno := :emp.deptno;
    :global.flag := 'T';
    GO_BLOCK('dept'); This will store the value of the deptno (primary key) in a global variable
    :global.deptno and set another global variable :global.flag to 'T'. This
    will be explained as we progress. 3. Create a WHEN-NEW-RECORD-INSTANCE trigger for the detail block
    and add the following : -- This is used to populate the MASTER block with the corresponding
    -- record whenever the user navigates through all the records in the
    -- DETAIL block if get_record_property(:system.cursor_record,:system.cursor_block,status) = 'QUERY' then
    SELECT rowid,deptno,dname,loc
    INTO :dept.rowid,:dept.deptno,:dept.dname,:dept.loc
    FROM dept
    WHERE deptno = :emp.deptno; -- This is to set the status of the record populated
    -- to QUERY and not to create a new record SET_RECORD_PROPERTY(1,'dept',status,QUERY_STATUS);
    end if; 4. Create a WHEN-NEW-BLOCK-INSTANCE trigger for the master block again
    and add this : if :global.flag = 'T' then -- set the variable to a different value
    :global.flag := 'F';
    :dept.deptno := :global.deptno; -- This will query the master table for the record based on the
    -- deptno of the detail table which is stored in :global.deptno -- For ex: if an employee of department 10 has been queried in
    -- the detail, then the global.deptno will have the value 10,
    -- which is used in the query below to fetch the master record. SELECT rowid,deptno,dname,loc
    INTO :dept.rowid,:dept.deptno,:dept.dname,:dept.loc
    FROM dept
    WHERE deptno = :global.deptno;
    set_record_property(:system.cursor_record,'dept',status,QUERY_STATUS);
    GO_BLOCK('emp'); end if; EXPLANATION
    =========== Actually in the above method we are using the base table blocks as a
    non-base table block when we query the master from detail. We are
    displaying the master record fetched from the table based on
    the query supplied in the detail. So after the fetch, if we clear the
    block or form then we get a "Do you want to save the changes you have made"
    alert. So in order to supress this while entering a normal master-detail
    query, we have created the global variable, :global.flag. There is a limitation though, if you query detail records and then
    navigate to the master block and then press the down arrow( i.e.,
    navigate to the next record) and then presses the up arrow to
    navigate back to the same record, then the detail records that
    were originally populated will change and a new set of records will
    get displayed. This is because the normal master-detail query is
    taking place during MASTER record navigation. This can be controlled by creating a flag (global variable) and setting
    its value and thus preventing the user from navigating to the next master
    record. Do the following : 1) In the KEY-EXEQRY trigger of the detail add the following :global.control_master := 1; 2) Create a KEY-EXEQRY for the master and add this : :global.control_master := 0;
    EXECUTE_QUERY; 3) Create a KEY-DOWN in the master with the following in it: IF :global.control_master <> 1 THEN
    down;
    END IF; Declare all the global variables before running the Form. RELATED DOCUMENTS
    Note:611.1

  • Difference between sales order schedule line and item level data

    Hi All,
    Could you please let me know what is the difference between sales order schedule line and item level data?
    Thanks,
    Ramya

    Hi Ramya,
    Sales order schedule line contains del date, order qty, rounded qty, confirmed qty, delivery qty, schedule line category, purchase requisition etc.,  ie It contains the full details of sales order data with respect to the scheduled line of delivery.  The total quantity of a sales order item can be subdivided into schedule lines that contain the various subsets with the corresponding delivering dates.
    Sales order Item level data contains details of the item in the sales order like material code, net price, net value, UoM, PO details, reason for rejection if any, material group,billing date, plant etc., ie this
    contains the full details of item irrespective of scheduled line.
    Regards,
    R. Senthil Mareeswaran.

  • Page level validation to prevent duplicate data entry into the database

    Hello,
    Can anyone please help me out with this issue.
    I have a form with two items based on a table. I already have an item level validation to check for null. Now I would like to create a page level validation to check that duplicate data are not entered into the database. I would like to check the database when the user clicks on ‘Create’ button to ensure they are not inserting duplicate record. If data already exist, then show the error message and redirect them to another page. I am using apex 3.2
    Thanks

    Hi,
    Have you tried writing a PLSQL function to check this?
    I haven't tested this specifically, but something like this should work:
    1) Create a Page Level Validation
    2) Choose PLSQL for the method
    3) Choose Function Returning Boolean for the Type
    For the validation code, you could do something like this:
    DECLARE
        v_cnt number;
    BEGIN
        select count(*)
        into v_cnt
        from
        your_table
        where
        col1 = :P1_field1 AND
        col2 = :P2_field2;
        if v_cnt > 0 then return false;
        else return true;
        end if;
    END;If the query returns false, then your error message will be displayed.
    Not sure how you would go about redirecting after this page though. Maybe just allow the user to try again with another value (in case they made a mistake) or just press a 'cancel' button to finish trying to create a new record.
    Amanda.

Maybe you are looking for

  • IPhone - Problems Syncing with iTunes

    Hi, Can anyone help with a an iPhone syncing issue: - I recently upgraded to iTunes 9.0.1 and my 3GS (OS3.1) will no longer sync smoothly with iTunes. On connection: - iPhone shows up in iTunes Devices list - iTunes displays the message "An iPhone ha

  • Finder re-starts every 3rd right click

    Description pretty much states this strange and new behavior, ever since I updated to 10.4.10. Right clicking on my desk top three times in a row results in finder restart. even if I right click on a folder or icon it happens but if I am using an act

  • Spry XML Data Set question

    Hello all, gotta question that I've been wresteling with for the better part of 2 days now. I'm running several filters on a very large data set. Each row in the data set is a product that has 8 or so properties. There are about 900 rows and each row

  • How to set quality status of a request in an infocube  by a function module

    Hi folks, in the maintenance of an infocube you have the possibility to go to a dialog called "maintenance of the automatism". That dialog allows you to set a flag therewith the quality status of a processed request is  set automatically to green. Do

  • CRYPT(3) replacement

    Hello, I'm writing a script to change passwords on different servers: windows, red hat, Solaris, ... For windows it is easy (thank you PowerShell) but for unix/linux it is harder. I'm looking to find a replacement for the command CRYPT(3) from linux