Set enabled in detail block based on record's data

Hi,
I have a detail block in tabular form(4.5).There is only one column "Hobby" which is disabled at design time and 4 records are displayed like as shown:
- Hobby -
Soccer
Baseball
Icehockey
Basketball
At run time I want to enable the records so that users can update it only if the hobby starts with letter 'B'.
I tried using set_item_property in post query but this will enable all records as the last record starts with "B" and the code will enable the column.

Try putting same trigger coding in WHEN-RECORD-INSTANCE
Message was edited by:
rajs

Similar Messages

  • Calculation in a detail block based on condition

    Hi guys,
    Well I want to calculate the SUM of some records in a detail block based on a condition.
    Like my block that is based on a table consist these fields,
    FUND_ID, NOMINEE_ID, FUND_PERCENTAGE
    Now I want to validate record the percentage user enter for each fund must not exceed 100%.
    Like for FUND_ID = 1 the number of records user enter for this FUND_ID 1 in the detail block in the percentage field must not increase 100% - like user can enter multiple record and any ratio of percentage. Like for rec1 FUND_PERCENTAGE can be 50% for rec2 its again 50%.
    In the same Block user can also enter percentage of the FUND_ID = 2 but I have to calculate for each FUND_ID.
    How can I calculate the fields based on a condition in a detail block.
    Pliz help,
    Imran

    referesing my question....

  • Recommended best practice to fetch detail block based on procedure

    HI
    I am creating a detail block (Dept)based on procedure which will be populated from the value from master block 'Emp'.
    For example,
    Detail block 'Dept' will be populated by calling procedure populate_detail(:emp.empno in number,dept.deptno out number) .
    But what are the triggers I need to call to populate detail block and at which level?
    I was thinking to call a WHEN-MOUSE-DOUBLECLICK on master block 'Emp' level to populate the detail block 'Dept' by calling the procedure and passing emp.empno as the parameter whenever the user moves from one master record to another.
    Please advise.
    Thanks in advance.

    Download the forms 6i examples CD from the OTN website

  • Help me !!!!!! set Arguments property for block based on store procedures

    hi
    i build a block based on storeprocedures ,if i set the
    Query Data Source Arguments property in design time with a value
    my form will work,
    but i need to set this property programetically and in runtime,
    if there is any built_in or other ways ,please help me.
    thanks in advance.
    shoja.

    Sorry, but there is no way to do this.
    If you need to switch the table you're selecting from, you have to do this
    inside your stored procedure.

  • Help !!!set Arguments property for block based on store procedures

    hi
    i build a block based on storeprocedures ,if i set the
    Query Data Source Arguments property in design time with a value
    my form will work,
    but i need to set this property programetically and in runtime,
    if there is any built_in or other ways ,please help me.
    thanks in advance.
    shoja.

    Sorry, but there is no way to do this.
    If you need to switch the table you're selecting from, you have to do this
    inside your stored procedure.

  • Update detail block based on FROM QUERY

    I have 2 blocks in master-detail relation. The master is based on a table, the detail on from query. The Insert works fine... but whenever i want to update any field from the detail block, the items (text, lists, whatever) don't allow any updating.
    Is there some workaround?
    Thank you for the help
    NR

    RTM on blocks based on from-query.
    If I recall well, it says that you shoud write the DML code in on-insert, on-update and on-delete triggers - and, anyway, if I do not remember well the manual, that's what I do.
    So, the on-insert trigger should have an insert into <my_dml_table>...
    The on-update trigger sould have an update <my_dml_table>... where ... And there's a thing: you may have the rowid of <my_dml_query> fetched - which would be the best - or use some primary key for that table for update (not so good performance).
    The on-delete trigger somewhat like the on-update trigger.
    Moreover, I believe it would be better to have procedures for on-insert, on-update and on-delete grouped in one package in the database - again, this is what I use to do.

  • Autofill detail block based on query

    Hi experts/Gurus
    I have 3 tables
    1-pr_mst
    2-pr_trn
    3-hr_mst
    Em_code is a common key between theses tables.
    on my form table 1 and 2 are the base main tables, due to the relationship, when i enter em_code on table 1 and query it, it shows data on both the table. Its a normal behavior in Master Detail block in forms.
    When user enter em_code at form and there is no data found in table 2, obviously it show blank data block related to the table 2 and shows data in table 1 block, now i want an em_code details which stores in the table 3 automatically load in memory and populated in detail block.
    Is it possible ? and how can i do this. suggest me a best or anybody can give example on emp/dept
    regards
    Anwer

    I'm not sure if i understand you correctly. You want to have an additional relation between block 1 and block 3? If so, just create it, each block can have more than one relation as master.

  • Block based on record group

    I'm trying to achieve same thing as is done in metalink note 38358.1 but for some reason ON-* triggers are never called.
    What settings do I have to set. Article just mentions "set block property 'use transactional triggers' to true", but in Forms 10g there is actually two places: DML and Query source where you can select "transactional triggers". Which one (or both) I have to set. Any other settings I have to check before those triggers will work?

    Funny, I created my block from scratch and now it works. Well, seems that this is standard behaviour in Forms - if something doesn't work do it again and it works... I have noticed that Forms Builder is not developer friendliest thing. (I think I last time added items before I setted up those transactional attributes, now I did it vice versa.)
    But thank you for your help and time.

  • [Forms 10] How to activate all buttons in a details block?

    Hi,
    I have a details block based on products. (10 lines)
    I have a block_buttons with a button on the same canvas.
    I set the block_buttons number of records to 10 so that the buttons and the records are aligned.
    [prodno] [button] <-- active
    [prodno] [button] <-- disabled
    [prodno] [button] <-- disabled
    [prodno] [button] <-- disabled
    [prodno] [button] <-- disabled
    At the moment only the first button is active.
    The 9 buttons under it are disabled.
    I can't find if I have to set a property or to write code to enable the 9 buttons under the first one.
    Thanks for your help.

    Hi,
    I have managed to get the buttons list to be actve.
    I have created a testbuttons table with a chkbx column.
    I added a checkbox list to the block.
    The button can't be a database item, but the checkbox can.
    Then if I execute_query on that block all items are activated.
    Now I'll try creating a PLSql table on the client side and try using it as support for the control block.

  • Problem in query detail block

    hello all,
    i have a form having master and detail block. in master we have store_cd and location code(primary key in master table),
    based on that detail recrds fetch in detail block. perfectly fine. but when i query within detail block records then it show no record found. please tell me what can be wrong.
    detail table primary key is (store_cd, location_code and storage_co) , in realtion i mentioned
    masterblock.store_cd=detailblock.store_cd and masterblock.location_cd=detailblock.location_cd
    Thanks
    yash

    yes, there are records in detail table... table structure(master and detail block)
    SQL> desc ivt_store_mst
    Name Null? Type
    STORE_CD NOT NULL VARCHAR2(3)
    STORE_DESC NOT NULL VARCHAR2(25)
    LVL_REF_CD NOT NULL VARCHAR2(6)
    STORE_TYPE VARCHAR2(2)
    Primary key(store_cd,lvl_ref_cd)
    SQL> desc ivt_storg_mst;
    Name Null? Type
    STORE_CD NOT NULL VARCHAR2(3)
    STORAGE_SRL_NO NOT NULL NUMBER(10)
    STORAGE_CD VARCHAR2(10)
    ITEM_CD NOT NULL VARCHAR2(10)
    BAY_NO VARCHAR2(10)
    SHELF_NO VARCHAR2(10)
    ROW_NO VARCHAR2(10)
    TIER_NO VARCHAR2(10)
    BIN_CARD_NO VARCHAR2(10)
    INSERT_DT DATE
    GRN_NO VARCHAR2(12)
    GRN_FIN_YR_CD VARCHAR2(8)
    PLEVEL_REF_CD NOT NULL VARCHAR2(6)
    PGRN_LEVEL_REF_CD VARCHAR2(6)
    Primary key(store_cd,storage_cd, plevel_ref_cd)
    relation property is: noo-isolated
    deferred: false
    autoquery: false
    block join condition based on detail_blk1.stor_cd=masteblk.store_cd
    when i query from master block , ALL detail blocks ITEMS are displaying. but when i query again among detail block items then, no record found base on query field(detail blk: item_cd which is base table field).
    when i query in detail block for all records then Every time only one item display with same item_cd...
    if further some info required, plz mention

  • Query a detail block

    Dear members,
    I use Forms 6i c/s, with a 8.1.7 database.
    I have two blocks, with a master-detail relation between them.
    When I try to search for records in the detail block (Enter-Query / Execute-Query), I get only one record: the one that was synchronized from the master block.
    I'd like to find a way to get all the records when querying the detail block, while keeping the master-detail relation.
    Any idea ?
    Is it just the "Copy value from item" on the detail block side that narrows the records to just one ?
    Or can I modify something in the triggers/procedures created by the relation ?
    Thanks for your help.

    I understood your idea of a separate search block, but >one thing remains unclear: where do I populate the >results ?You still query the original M-D blocks to get results by setting the master/detail block's default-where property and execute_query on the block respectively.
    You need to concate the user inputs into a string for default-where as user may input ename and sal two fields to find out how many departments and dependents info.
    The separate dialog even allows user to input detail block's ename, sal and master block's loc fields to get the specific department, which default M-D cannot do this.
    In addition, default search button does not allow you set one master or detail block default-where and execute-query, then go to detail or master block to set default-where and execute-query.
    You do a simple testing on tables of dept and emp, then you will sense this.
    Good luck.

  • Master - detail block (many-to-many)

    Hello, , I have 2 tables:
    1-(parts)its primary key : p_id
    2-(suppliers)its primary key : s_id
    and they have many-to-many relationship between them .
    the table Resulted from the relationship is(part_supp)
    How can I create master-detail block Based on this relationship.In other words, which of tables will be the master and which of them well be detail.
    I am using form 6i ..
    please help.....

    M3ATH wrote:
    Hello, , I have 2 tables:
    1-(parts)its primary key : p_id
    2-(suppliers)its primary key : s_id
    and they have many-to-many relationship between them .Many to many relation between two table isn't a good database design. You have to a junction table between them.
    the table Resulted from the relationship is(part_supp)Is this your junction table(part_supp) ?
    >
    How can I create master-detail block Based on this relationship.In other words, which of tables will be the master and which of them well be detail.If part_supp is your junction table between parts and suppliers then, try this..
    Use the junction table as a hidden block, then establish a standard Forms relation between
    Parts and (hidden)part_supp then between part_supp and suppliersHope this helps

  • How to display data in detail block from a table.

    Dear members,
    i have 2 blocks. 1 is master block and another is detail block with multiple records.
    the requirement is when i navigate to the detail block the data from a table is displayed in it. using a where clause depend on the value in an item in the master block.
    i wrote the following code and tried in when-new-block-instance, when-new-record-instance, pre-block and post-block
    but...
    DECLARE
         CURSOR ITEM_CUR IS
         SELECT ITEM_ID, QTY_APPROVED
         FROM IN_REQUEST_FORM_DETAIL
         WHERE RF_MASTER_ID = :IN_MASTER_PO.RF_ID;
    BEGIN
         FOR ITEM_REC IN ITEM_CUR LOOP
              :IN_PO_DETAIL.ITEM_ID := ITEM_REC.ITEM_ID;
              :IN_PO_DETAIL.DIS_APPROVED_QTY := ITEM_REC.QTY_APPROVED;
              NEXT_RECORD;
              END LOOP;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
         MESSAGE ('THERE IS NO REQUESTS');
    END;

    thanks dear simon,
    i want to display the data from a table not included in this form. and these two tables are connected via a relation.
    i have the following tables.
    in_master_po
    PO_ID pk
    PO_DATE
    RF_DETAIL_ID fk (in_request_form_detail)
    in_po_detail
    DETAIL_PO_ID pk
    ITEM_ID fk
    PO_ID fk (in_master_po)
    QTY
    the above 2 tables are datablocks connected via relation
    the following is the from which i want to bring the data to display
    in_request_form_detail
    RF_DETAIL_ID pk
    ITEM_ID fk (items)
    QTY_REQ
    i tried my code on the sample tables with scott/tiger there it works good.
    thanks
    Muhammad Nadeem

  • Batch search strategy based on goods receipt date

    Hello,
    Can some one help me with setting up Batch search strategy based on goods receipt date currently is on batch number.
    Thanks a lot
    Thanks!
    Best Regards
    Srw

    Hi
    If you want to set up Batch search strategy based on goods receipt date......then you have to create GR Date as one charecteristics in T.Code: CT04 and assign this charecter in Class with respect to class type  023
    Then assign this class in Material Master Classification view..
    Make sure in Material master, Purchasing view...you have activated Batch management active check box....
    Then when ever you do GR in MIGO, In batch tab, In classification field maintain the GR Date..
    Then Create sort sequence in  T.Code: CU70 and you can maintain in what basis ie)in assending or desending GR Date you have to search the batch..
    And then Create Batch Search Statergy in MBC1 and there you assign the sort sequence in Details...
    Now  you do your regular procedings.....the material Batch will be searched based on GR Date...
    Reward if useful
    Regards
    S.Baskaran

  • How to ensure a record is created in a block linked to a detail block?

    Hi All,
    I am stuck. In my form I have a master block (blockA), a detail block (blockB) and a third block (blockC) that is linked to blockB via a standard relation on blockB where blockB.id = blockC.id. In blockB if column adtype = 'P' then the requirement is that a corresponding record is entered into blockC. So If I enter several detail records into blockB and set adtype = 'P' on each then I can double click on each and add the details to blockC. Save. This works fine and when I re-query each of the records can be seen as appropriate. The problem I'm facing is enforcing a record to be entered into blockC based on the adtype equaling 'P' in blockB. I have tried performing checks in lots of different triggers but to no avail the same thing keeps happening which is this. If I create more than one record in blockB with an adtype of 'P' but don't enter any details into blockC my checks will always flag this up when saving. If however I enter some details into blockC for the first of the records from blockB with an adtype of 'P' then all checks are passed and no errors are raised. It is as if that now a record exists in blockC I can no longer check for the existence of a record even though that record is only applicable to the first record in blockB and not any of the others??
    I hope I have explained this clearly enough for someone to come to my aide as I am truly stumped!
    Many Thanks in advance
    Matt

    I think I understand your situation (a bit difficult to follow indeed) but the problem might be here:
    > If I create more than one record in blockB
    With a master-detail, you have to save the master and detail data before continuing to another master record. So, you cannot enter several records in blockB and several records in blockC at the same time.
    I wonder, did you never get a "do you want to save the changes" message when going from one record in blockB to the next?

Maybe you are looking for

  • 2 iphones 1 apple id

    Hi,  I am new to Apple and both my wife and I each have iphone5's and ipad's.  We want to have one Apple ID so we do not have to purchase apps or books twice.  However, we do not want to share contacts, email, phone calls, or anything else.  We do wa

  • Is it possible to trigger a transaction from an email sent to SAP mail box?

    Hi All, I have found a strange requirement where a transaction has to be triggered by double clicking on a line in the email sent to SAP Mail box...!!! The requirement is, a batch input program has to be executed and an email with error details has t

  • IWeb & os x Mountain Lion

    after installing os x Mountain Lion, iWeb lost my site details and I cannot edit it anymore. how can I recover my site

  • Datapump - Parallelism is not working

    Hello, I am running 11.1.0.7 on AIX. I am taking an expdp of an table using the value of 4 for parameter PARALLEL. expdp SYSTEM TABLES=MYTEST.HISTORY DIRECTORY=EXPORT_FILES DUMPFILE=TEST_HIST_%U.EXPDP.DMP LOGFILE=TEST_HIST.EXPDP.LOG PARALLEL=4But I s

  • Pr. CC - Little problem with exportation

    I got my video, it lasts around 40 mins. 2 cams. On editing I see audio and two video clips in sync, perfect. On my final exported mpg video, the first cam is little delayed and the the second is in sync. Why that? Here my exportation settings: mpeg2