Jump to one defined record in multirecord block

Hello.
I have a multirecord block.
ex:
rec, day, text
rec1, day1, text1
rec2, day1, text2
rec3, day2, text1
rec4, day2, text2
rec5, day2, text3
rec6, day3, text1
User can select any record in that block. But when he presses one button, form should first jump to first record of that day, then execute everything else in that trigger.
If the user is in record:
rec5, day2, text3
form should jump to record:
rec3, day2, text1
If the user is in record:
rec2, day1, text2
form should jump to record:
rec1, day1, text1.
And so on.
Is there a way to do that?
Thanks.

Another technique ...
Declare
     v_Day Table.Field%Type;
Begin
     v_Day := :Rec.Day;
     Previous_Record;
     Loop
          if :Rec.Day <> v_Day then
               Next_Record;
               Exit;
          else
               Previous_Record;
               if :System.Cursor_Record = 1 then
                    Exit;
               End if;
          End if;
     End Loop;
End;
Best regards
R E H A N M I R Z A

Similar Messages

  • Disable button when no records in multirecord block.

    Hello,
    In a tabular multirecord block we have a button that will open another window for the selected row. The problem is that when there are no records in the multirecord-block, the first line is still selected, and the pushbutton is enabled. This will cause an error when the user press the button when there are no records. Adding code to the button will of course take care of the error, but it is still enabled. How do we disable the entire line when there are no records?

    how about - directly after querying the master record...
    go_block(<block>)
    if :blk.key (or :blk.rowid) is null then
      SET_ITEM_PROPERTY('<buttonname>',enabled, property_false);

  • Showing 10 records at a time in a multirecord block

    Hello,
    I have a requirement to show 10 records at a time,consider a table in which
    there are 100 records which is associated to a multirecord block,in order to have a web look and feel I need to show first 10(1 to 10) record on load,when the user presses the button "Next 10 records", I need to replace the first 10 records with new set of 10 records(11 - 20),
    Please note that no of records to be displayed at a time will be 10 and our requirement is avoid scroll bar.
    Any suggestions as to how I need to accomplish the task above.
    Thanks and Regards
    Mohan

    You don't need a special button for this because the user can already navigate using the cursor keys and page up/down keys.
    For cursor keys use the key-up, key-down, key-nxtrec and key-prvrec triggers.
    For page up/down use the key-scrup and key-scrdown triggers.
    I suppose the menu option "Query > Fetch Next Set" (key-nxtset) should operate the same as page down.
    An example of the key-scrdown trigger is thisdeclare
         numrecs integer := get_block_property('EMP',records_displayed);
         toprec integer := get_block_property('EMP',top_record);
         thisrec integer := :system.trigger_record;
    begin
         go_record(toprec + (2 * numrecs) - 1);
         go_record(thisrec + numrecs);
    end;This will advance by as many records are in the block and leave the cursor positioned on the same record relative to the top of the block. Eg if there are 10 rows in the block and you're on the first set then the top record will be 1 and you want to make the new top record 11. So you need to call go_record(20), which makes that the bottom record and 11 the top one.
    You'll need to work out how the form should behave when the number of records in the block is not exactly divisible by the number of records in the data because forms won't allow blank records to pad out the bottom of the block and records_displayed isn't a settable property at runtime. So if there are 10 rows in the block and 103 rows of data then the penultimate page will show records 91-100 and the last page will show records 94-103. Should scrolling back up show record 91 at the top, or 84?
    For the key-down/key-nxtrec trigger you'll probably want something like thisdeclare
         numrecs integer := get_block_property('EMP',records_displayed);
    begin
         if :system.last_record != 'TRUE' then
              if mod(:system.cursor_record,numrecs) = 0 then
                   -- last record in this set
                   go_record(:system.cursor_record + numrecs);
                   go_record(:system.cursor_record - (numrecs - 1));
              else
                   next_record;
              end if;
         end if;
    end;If you're at the bottom of one set it will show the next set and go to the top record, otherwise it will just go to the next record. But again, this breaks down when the number of rows in the block and in the data don't divide up evenly.
    I hope this is enough to get you started.

  • Push Button in Multirecord block and Record Number

    Hi All,
    I have a push button in Multirecord block.
    for eg. there are 5 records in that block and cursor is on 1st record. if users pressess the push button on 3rd record (or other than 1st record) i want to get that 3rd record number. i am not able to get this. i checked :system.trigger_record, cursor_record, mouse_record values but it is not working correctly.
    what code should i write in when-button-pressed trigger to work it the way i want.
    can anybody help.
    regds

    Yes i got it
    Re: multi-record push button
    set mouse navigable property to true for push button and you get the :system.trigger_record value.

  • Problem with multirecord block

    Hi every one
    I have multirecord block in form conten 2 textitem A & B
    and i have checkbox .
    i need when i check the checkbox set instance item A Enable and item B Disable
    and vice versa
    the problem is when i check the checkbox all instance of item enable or disable
    but i want that instance what I foucs on .

    You can't disable/enable an individual instance of a multi-record item.
    What you CAN do is use SET_ITEM_INSTANCE_PROPERTY to set INSERT_ALLOWED, UPDATE_ALLOWED and VISUAL_ATTRIBUTE. To disable, set up a visual attribute that mimics a disabled field, and set INSERT_ALLOWED and UPDATE_ALLOWED to false. If you don't want them to be able to click or tab the cursor into the field create a pre-text-item trigger on the items that checks the value of the checkbox and raises form_trigger_failure if this field should be disabled.

  • Validation of item in a multirecord block(Forms 6i,EBS 11.5.10.2)

    Hi all,
    I developed a form in which some of the blocks are multirecord blocks.One of the multirecord block have 3 items in it.
    The user may enter data like this
    FROM TO RATE
    0 1000 10
    1000 2000 9
    2000 3000 8.5
    My requirement is the FROM field value of the 2nd record should not be less than the TO field value of 1st record. The FROM field value of the 3rd record should not be less than TO field value of the 2nd record and so on...
    i.e the form should not allow the user to enter data like this
    FROM TO RATE
    0 1000 10
    900 2000 9
    800 3000 8.5
    Can anyone suggest me how to do this?
    Thanks & Regards

    Hi all,
    I developed a form in which some of the blocks are multirecord blocks.One of the multirecord block have 3 items in it.
    The user may enter data like this
    FROM TO RATE
    0 1000 10
    1000 2000 9
    2000 3000 8.5
    My requirement is the FROM field value of the 2nd record should not be less than the TO field value of 1st record. The FROM field value of the 3rd record should not be less than TO field value of the 2nd record and so on...
    i.e the form should not allow the user to enter data like this
    FROM TO RATE
    0 1000 10
    900 2000 9
    800 3000 8.5
    Can anyone suggest me how to do this?
    Thanks & Regards

  • Have a multirecord block with several unbound items, filled by calling just

    In oracle forms I have a form with a multi-record block, with several unbound items.
    One of these unbound items is a formula based item.
    The formula for this item fills the others unbound items.
    A procedure with several out parameters is called.
    E.g.
    :cmr.id (holding the unique id of a database record)
    :cmr.unbound_dummy, with formula f_fill_blk_unbound_items(:blk.id)
    :cmr.unbound_adres
    :cmr.unbound_contactperson
    function f_fill_blk_unbound_items(p_id in customers.id%type)
    return number
    is
    l_rc number;
    begin
    customer_pck.get_adres_and_contactperson
    (p_id => p_id --IN
    ,p_adres => :cmr.unbound_adres --OUT
    ,p_contactperson => :cmr.unbound_contactperson --OUT
    return(0);
    end;
    QUESTION: how can I do something similar in APEX; have a multirecord block with several unbound items, filled by calling just one procedure with several out parameters ?

    Thank you for your reply.
    I can write database functions as wrappers, one for each out parameter, and use these in a select.
    But:
    - having one procedure with several out parameters was done for performance reasons.
    - I want to leave my database as is, and just replace the client.
    Easy as this is using Oracle developer forms, I cannot find out how to do this in any of the APEX examples/documentation.

  • How to check the previous item value in a multirecord block

    Oracle Version:10g
    Forms Version:10g
    Hi all,
    Good morning to all,I have a multi-record block in a form where one of the items values is been selected from LOV.user can only select the value from LOV.
    If once user selects the value from LOV and moves to the next record of multi-record and again selects the value from LOV,i should not allow users to select the previous value from the user so that duplication of records is avoided.
    and important note is that i should achieve this before saving it into the database because once saved in the database i can compare the values and hide the previous value.
    Any help will be appreciated.
    Thanks and Regards

    This is a common question in the forum! There are several different solutions. Take a look at the following articles. Both will perform the needed duplicate check.
    Forms - Record Group Processing (Duplicate Value Checking...
    or
    Avoid duplicated records in a block
    If neither of these solutions work for you, search the forum for other options.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Multi-Record (NON-DB) block - duplicate records

    I have a non-db block called 'EDITOR_INFO' that captures all the editor's information. The block has the following fields in it: editor_name,editor_type,address_lines1 thru4, city, state, zip, taxid_ssn_type,taxid_ssn.
    I need to check to make sure that the user is not entering the duplicate editors. How can I adapt the infamous Kevin Clarke's solution to this (if at all)? What would be my datablock, control block etc?
    Can any one pls. provide any guidance.
    Thanks,
    Chiru
    Edited by: Megastar_Chiru on Nov 8, 2010 3:55 PM
    Edited by: Megastar_Chiru on Nov 8, 2010 3:56 PM

    Chiru, if all you need is to add/query records in a block, you should consider making a data-block instead of control-block. And use POST to post the data into table which will let you check against the table if a record exists or not.
    But if you want to have it done using a control-block then follow below sample steps.
    In WHEN-VALIDATE-RECORD of your control block, you can check if entered record is already in the table or not.
    If it exists, then raise error message and stop until user corrects the data... if it does not exist, then INSERT into the table.
    For this scenario, I created a small table with two columns.
    CREATE TABLE TABLE_A (Col1 NUMBER, Col2 VARCHAR2(30));Now I created a form with a control block (BLOCK2). It has 10 records with vertical layout and two control-items on it (TEXT_ITEM4 and TEXT_ITEM5). And below is code used on WHEN-VALIDATE-RECORD.
    -- WHEN-VALIDATE-RECORD
    DECLARE
      temp VARCHAR2(1);
      CURSOR c_check_existance IS
      SELECT 'X'
        FROM table_a
       WHERE col1 = :BLOCK2.text_item4;
    BEGIN
        :GLOBAL.Valid_Records := 'N';
         IF :block2.text_item4 IS NOT NULL THEN          
              OPEN c_check_existance;
              FETCH c_check_existance INTO temp;
              IF c_check_existance%FOUND THEN
                   CLOSE c_check_existance;
                                                    :GLOBAL.Valid_Records := 'N';
                   MESSAGE('Record already exists in table');
                   RAISE FORM_TRIGGER_FAILURE;
              ELSE
                   INSERT INTO table_a (col1, col2)
                                VALUES (:block2.text_item4, :block2.text_item5);
                                                    :GLOBAL.Valid_Records := 'Y';
              END IF;
              CLOSE c_check_existance;
         END IF;
    END;Remember, when making a control block like a data block, you have to code everything yourself.

  • Tooltip for Multirecord Block, Please help

    Hi All,
    I am using Formbuilder 6.0.5.32.0
    I am facing two problems with Tooltips, on a multirecord block.
    First of all, the tooltip is displayed only for the topmost
    record in the multirecord block.
    Secondly i want to change the tooltip of the item,based on the
    data displayed .
    Here i tried to use "SET_ITEM_INSTANCE_PROPERTY" in When new
    record instance trigger.But i am getting an error message "
    Unhandled exception ORA 06502"
    Can anybody give me a help.
    Thanks in advance,
    Regards
    Jiji Nair.
    null

    Hi Asbj0rn,
    Thanks for the solution. But iam still facing a problem. If i
    use a stacked canvas, the maximum width of the stackcanvas is
    limited to the maximum width of the widow, to which the canvas
    belongs to. But in the case of a tooltip, there is no such
    restrictions .
    Any suggestions. Thanks
    Jiji
    Asbj0rn Floden (guest) wrote:
    : As you've already found out, the tooltip mechanism in Forms
    : doesn't solve your problem.
    : In order to display a tooltip reflecting the contents of the
    : record on which the mouse cursor is positioned, I believe
    you'd
    : have to make your own kind of tooltip. By using a small
    stacked
    : canvas designed as a regular tooltip with a simple display
    item
    : (with the appropriate background and foreground colors for a
    : tooltip), you can display any information you want at any
    : position you like. Use the WHEN-MOUSE-ENTER and WHEN-MOUSE-
    : LEAVE triggers to display/hide your tooltip. Inside the
    : trigger, you retrieve the information you want to display in
    the
    : tooltip (hint: use the :SYSTEM.MOUSE_RECORD variable), and
    : raise the stacked tooltip canvas at your desired position
    (based
    : on the position of the item or the mouse cursor). You can
    also
    : use a timer to hide the tooltip after a specific periode of
    time.
    : Hope this help you solving your problem.
    : NOTE: I haven't implemented this solution myself.
    : Sincerely, Asbj0rn
    : Jijikumar U Nair (guest) wrote:
    : : Hi All,
    : : I am using Formbuilder 6.0.5.32.0
    : : I am facing two problems with Tooltips, on a multirecord
    block.
    : : First of all, the tooltip is displayed only for the
    topmost
    : : record in the multirecord block.
    : : Secondly i want to change the tooltip of the item,based on
    the
    : : data displayed .
    : : Here i tried to use "SET_ITEM_INSTANCE_PROPERTY" in When new
    : : record instance trigger.But i am getting an error message "
    : : Unhandled exception ORA 06502"
    : : Can anybody give me a help.
    : : Thanks in advance,
    : : Regards
    : : Jiji Nair.
    null

  • Some needs in multirecord block

    Hi,
    I need to do some modifications in a multirecord block and need some help
    --i need to loop each record to compare if end date field in the previous record is not greater than the start date field in current record
    --i need also for records which already exist, to disable update on the start date field
    do you have any idea on how to do that? thank you very much and any help will be appreciated.
    Thx

    Hi,
    and thanks
    I did the modification but getting a FRM-40102 Records must be inserted or deleted first,
    do you have any idea on the root cause?
    Also, how to compare values in previous row with values in current row?
    Thanks
    Edited by: Tabit7 on 2012-02-11 08:50

  • Filtering records in a block

    Hi all,
    I am working on form developed by some other party.
    In this form one is control block which contains a combo box.
    There is another data block which is based on a table.
    When I run the form the records in this block are filtered by the value chosen in combo box.
    But I am not able to find the code where this functionality is achieved.
    I have checked WHERE clause property of block and the property is null.
    Also default_where is not set at runtime.
    Is there any other way to filter records in a block?
    Thanks in advance.
    MK

    Hi there,
    If there a Push Button on the Control Block to initiate the Execute query for the data block, then the code is in the When-Button-pressed trigger.
    If there is no Push Button and if the data block (based on table) changes after a new value is chosen from the combo box, then the default_where or onetime_where code may be hiding behind a When-Validate-item trigger (or some other trigger) in the combo box.
    In our application, we have many 'search' fields in the control block. We use a Push Button to build the dynamic where clause for the data block.
    Regards,
    John

  • Enable/disable an item in a multirecord block

    hello to all
    How is possible Enable/disable an item in a multirecord block?
    set_item_property change all instances of an item in a multi-record block
    SET_ITEM_INSTANCE_PROPERTY only affects the display
    thanks

    Hi,
    You cannot set the Enabled property in a multi-record block, instead you can change the INSERT_ALLOWED, UPDATE_ALLOWED properties. So that the user can't change the value in the item.
    Regards,
    Manu.
    If my response or the response of another was helpful, please mark it accordingly

  • Whenever i start my ipad2 the applications automatically starts to open and close automatically jumps from one screen to another

    Whenever i start my ipad2 the applications automatically starts to open and close automatically jumps from one screen to another cannot operate the ipad at all, tried switching off and back on again, also restored the ipad but of no use

    try restart
    http://support.apple.com/kb/HT1430

  • In eText template, how to put multiple transaction in one logic record

    Canada Bank often use CPA Standard 005, a.k.a. CPA 1464 specification. it comes with a Header and a Trailer record, but the detail record main contains upto 6 transactions in one logic record, that is, it has 7 segments,
    segments 0 contains 3 common fields followed by segment 1~6, each contains one payament.
    The total records lenght is 1464. Question is how to create a custom level to have 6 transactions in one logic record.
    Anyone has done so, please give me some tips. If you have a sample template available, please forward me a copy, it is for supplier payment...
    Thank you in advance,

    Canada Bank often use CPA Standard 005, a.k.a. CPA 1464 specification. it comes with a Header and a Trailer record, but the detail record main contains upto 6 transactions in one logic record, that is, it has 7 segments,
    segments 0 contains 3 common fields followed by segment 1~6, each contains one payament.
    The total records lenght is 1464. Question is how to create a custom level to have 6 transactions in one logic record.
    Anyone has done so, please give me some tips. If you have a sample template available, please forward me a copy, it is for supplier payment...
    Thank you in advance,

Maybe you are looking for

  • Not able to create a link

    Hi, this is my scenario. i have this one report page with 3 report regions. i have a hidden item called "item1" in region1, i display my 1 record match. and the first column called "collection" of the record i want to trap it into the hidden value. a

  • How to change the paper type in printer settings?

    Does anyone know how to change the paper type in printer settings?  I'm trying to have the ability to change it to photo paper from Photoshop Elements.  I can't find the option in printer settings or through Elements.  I'm assuming I could save an ad

  • Informatica 9.1 installation on windows 7 64 bit

    Hi guys Could you please help me in installing informatica 9.1 on windows 7 64-bit OS... while extracting the part 2 zip file i am getting below error but the extraction continues ! C:\Downloads\dac_win_101341_infa_win_x86_64bit_910.z01: Cannot creat

  • How to find the list of Queries for that have statistics enabled in the sys

    Hi , How to find the list of Queries  that have statistics enabled on them in the system. Please help me in this regard Thanks Maruthi

  • Turn buttons off on the playbar ?

    Hi I'm using Captivate 4, I dont often use the playbar as I'm not keen on the lack of functionality. The customer wants the playbar but wants the forward button to be inactive on some screens.  I know i can turn the playbar on/off but thats not an id