How to do it in multi-record block

Hi all,
i have 1 text items in a multi-record block number of record displayed 10
and i have values like 100 , 50, 30 in first 3 records and in 5th record i want to put some value like
20 then i want to calculate all values like 100 + 50 + 30 +20 = 200 and i want to put the total value in a single record block.
but my problem is i cannot able to calculate all the value because for the totale value i have to
write a for loop to loop through the record
but go_block() is not working in post_change .
if any solution is there plz suggest.......

Hi zeeshan
my problem is i cannot able to calculate all the value because for the total value
put the total value in a single record block.
First pls the following...
Guidelines for Working with Calculated Items Calculated items_
1- They are display-only control items.
2-Calculated items cannot be database items.
3.While you can set a calculated item's Enabled, Mouse Navigate, and Keyboard Navigable properties to Yes,
you cannot set the Insert Allowed or Update Allowed properties to Yes
Second Keyword: TOTAL is a reserved oracle key word... pls read the Details...
go_block() is not working in post_change .well u can use timers but no need for it u can reference block item but first u have to accumulate the values per record in WHEN-VALIDATE-ITEM TRIGGER in the last calculated item which is inserted by the user and assign it to the display item in ur current multi-record block :*block_name.total_item*.. as follow...
:block_name.total_item := :item1 + .... ; Then u create a second display item > no of records property = 1 , named e.g. final_summarized_totals
In order to summarize this total values accumulated in the multi-record display item named e.g. block_name.total_item
Finally using PRE-INSERT , PRE-UPDATE,PRE-DELETE Triggers to assign the value calculated into the display item * block_name.total_item* into the db_item into the previously mentioned Trigger Block-Level Off-course.
:block_name.total_db_tem := :i:block_name.final_summarized_totals ; Hope this helps...
Regards,
Amatu Allah

Similar Messages

  • How to do validation on multi record block at run time...

    Dear Friends,
    I have to do validation at run time on multi record block.
    If user tries to enter and save two or more records in same multi record block with same data at run time, it should not allow it and display a message like, " error : Records are having same(duplicate) values. "
    I already did validation with the data coming from database table using cursor. But confused about how to do at run time(on one screen only) ??
    Please, give details about how to check duplicate records on form block before saving it to the table ????
    Regarding details would be greatly helpful.
    thanks,

    Hi...Pankaj
    thanx for your reply..
    I already did validation for the data coming from table....
    but I need to do it on form only...at run time...
    exa...
    In one multi record block
    record no : column 1 : column 2 : column 3
    1 abc 123 hi
    2 abc 123 hi
    so it should check on the form itself, here I m not getting data from table...I am just
    navigating from first record to second using down arrow.
    so, may be 2 possibilities.
    1) when user navigates using tab to third record, it should say like two duplicate records.(may be like when validate record or item)
    2) or when user tries to save, it should say two duplicate records.
    so, everyting should take place on form screen only.....
    waiting for your reply,
    thanx...

  • How can I create a loop in a multi-record block (on the background)

    I have a multi-record block.
    In one item I change a value.
    Upon this change, in the when-validate-item I would like to
    change other records in the same block.
    I planned to loop the block with go_record and to do my things
    in each record. Unfortunately the go_record built-in is
    restricted and cannot be used in a wvi-trigger.
    Another approach can be to update the records in the database
    and to perform an execute_query after this change. Also this
    procedure cannot be used in a wvi.
    How can I easily loop in a multi-record block???

    You can try to put loop with go_record in KEY-NEXT-ITEM on that
    field.
    Or if you change something and then press KEY-COMMIT you can
    update another records in database and after commit do again
    execute_query. Something like :
    on KEY-COMMIT:
    update_another_records;
    commit_form;
    execute_query;

  • Enabling the current record only in a multi record block..how?

    Hi,
    I'am trying to enable a single record in a multi record block.
    If i use SET_ITEM_PROPERTY it enables all records, SET_ITEM_INSTANCE PROPERTY does not have ENABLED Property.., so how to go about this?
    I have a check box beside each record, if i check the check box only that record should get enabled..is there any way?
    Regards
    Mahesh

    I found out the answer :
    technical note 661 on on Siebel Supportweb (metalink3) :
    "how to embed OBI requests in Siebel Business Application views, so that navigating among the records in the parent applet updates the child Analytics applet with context-appropriate content"

  • How to get the original record Number in Multi-Record Block

    Hello Everyone,
    I know how to find the duplicate item in the multi-Record block,
    For Ex:
    Line_Num            Item_Name             Quantity
    1                           AA                      10
    2                           BB                      20
    3                           AA Here 3rd record Item_name is duplicated, I can able to check and display the message that 'Item is duplicated' ,I found from [sheikyerbouti.developpez.com/duplicates/duplicates.htm] .
    but I want to show along with original line number i.e 1 when the item_name is entered .
    Here I want to check the original Line_Num and want to display the message
    'Item is duplicated,Update quantity in Original Line 1'
    Can anyone help me to get this?
    Thank You.
    Regards,
    Guru.

    Hi Francois,
    Actually I want to check and show the message when the item_name is entered i.e WHEN-VALIDATE-ITEM TRIGGER.
    I put the following code in WHEN-VALIDATE-ITEM TRIGGER
    Declare
         curnum number;
         dupnum number;
         cur_item varchar2(100);
         v_alert_no number;
         p_linerec varchar2(100);
    Begin
    curnum := TO_NUMBER(:System.Trigger_Record);
    cur_item := :Lines.Item_number;
    First_Record;
    p_linerec := :Lines.Item_number;
    LOOP
    If p_linerec = cur_item then
         dupnum := :Lines.Line_num;
         set_alert_property('ALERT_STOP',ALERT_MESSAGE_TEXT,
    'Duplicate Item Found,Update QTY in Original line number '||dupnum);
       V_ALERT_NO := show_alert('ALERT_STOP');
       :LINES.ITEM_NUMBER := NULL;
    :LINES.ITEM_DESCRIPTION:= NULL;
    :LINES.ITEM_REVISION:= NULL;
    :LINES.ITEM_CATEGORY:= NULL;
    elsIF (:System.Last_Record = 'TRUE') THEN
         Go_Record(curnum);
         EXIT;
      ELSE
         Next_Record;
      END IF;
    END LOOP;
    End; But I am getting the following error,
    FRM-40737:Illegal Restricted Procedure
    FIRST_RECORD in WHEN-VALIDATE-TRIGGERand then
    its showing for first line itself.
    Duplicate Item found.Update QTY in Original line number 1so I put the condition
    If :Lines.Line_num > 1 then --Only to check when the block having more than one record.but now it checking from second record and displaying,
    Duplicate Item found.Update QTY in Original line number 2 --(instead of Update QTY in Original line number 1)Can you tell me how can I change the above code for my requirement?
    Thank you.
    Edited by: Gurujothi on 27 Mar, 2013 5:20 PM

  • How to make the column in multi-record block resizable?

    I am using Form6o, can I make the column in a multi-record block resizable?
    Thanks!

    I don't know exactly how they did it, but I have seen it done in Forms 6i. It is not exactly Excel style, but it comes close. You can use when-mouse-down and when-mouse-up triggers to determine start and end position of the mouse (with system.mouse_x_pos) and then set the width property.
    So, when you drag the mouse, you don't see the column size increase, you only see the result after you let go of the mouse button.

  • How to call a report with a bind variable from a multi-record block

    Hi,
    I have created a report using the BI Publisher functionality. I did all the integration, created the SQL Query and uploaded the template. Up till here everythings fine!
    My SQL Query has 2 bind variables.
    I will call my report from a multi record block, at the end of each record an icon is shown which the user can click to open the report.
    I created a column link for this item (PRINT_REPORT=Inschrijvingsformulier) but I do not manage to pass the parameters to my report. The parameters I want to pass are 2 columns in this Multi Record block.
    I created 2 hidden fields on the page P9_PARAMETER1, P9_PARAMETER2 with the same names as my bind variables and fill this in with the values #PARAMETER1#, #PARAMETER2# from the multi record block.
    It seems it does not work as my report stays empty. (also XML file stays empty).
    Am I trying the wrong way?
    Thanks for any advice,
    Kris

    hi khadeer,
         create one report program and write the required code,and call this function module 'SSF_FUNCTION_MODULE_NAME' and give your smartform name  and also when u activate ur smart form u will get one function module call that function module also and specify any tables used...
    i think this solves ur problem...
    any queries revert back..
    pls reward points if helpful,
    shylaja

  • How to convert a puch button disabled in a multi record block?

    Hi!
    I have a multi-record block and I need to set some specific item to disabled.
    I tried using set_item_instance_property with the following sentence:
    set_item_instance_property('INAF_ESC.EEAS_TIPO' ,CURRENT_RECORD, ENABLED , PROPERTY_FALSE);
    but it didn´t work.
    Anyone have any idea?
    Thanks
    Vero

    Hi,
    ENABLED is not supported SET_ITEM_INSTANCE_PROPERTY built-in.
    If you are env. has no mouse enabled, you can disable NAVIGABLE property using above builtin.
    There is a way make the end-user to feel like it is disabled.
    Create a visual attribute DISABLE_VA, with colors simillar to disabled buttion and set thie DISABLE_VA when the conditon is failed.
    Inside the button-pressed trigger check whether the conditon is true or false. If the conditon is failed you simply do nothing.
    ~Gouri Sankar
    But we can not stop the click action,

  • How to set default settings to display record count in multi record block

    Hi All
    Whenever I query my multi record block, I get 1/? as record count at the console in standard Oracle Applications. Is there any setting so that it displays 1/50 (in case total record queried is 50). I don't want to set query all property of block as I don't have any control in standard Apps forms.
    Thanks in advance
    Navdeep

    Check out the next_navigation_item option for the get_item_property procedure. If you use this you can do the process without having to navigate from one item to the next.
    You can do something like this (untested) to move and resize the items (other than the first in the block):
    PROCEDURE move_and_resize(p_item IN ITEM, p_width IN PLS_INTEGER) IS
      prev_item ITEM := Get_Item_Property(p_item, PREVIOUS_NAVIGATION_ITEM);
    BEGIN
      Set_Item_Property(p_item, WIDTH, Get_Item_Property(p_item, WIDTH) + p_width);
      Set_Item_Property(p_item, X_POS, Get_Item_Property(prev_item, WIDTH) +
                                       Get_Item_Property(prev_item, X_POS));
    END move_and_resize;
    move_and_resize(myitem, -30);

  • Get next value in a Multi Record Block

    Hi,
    I've a Multi Record block with 2 items like below.
    pos width
    1 7
    8 5
    13 5
    18 2
    ie pos in next item is sum of pos and width of previous item.I've already implemented this.
    The problem is if the user changes width in a particular record,I want to change next records pos automatically.
    To achieve this,I wrote a when-new-record -instance-trigger as follws:
    if :system.cursor_record=1 then
    :pos:=1;
    elsif :system.record_status='changed' then
    :pos:=:pos+:width;
    end if;
    but even Though I change column width of block,:system.record_status still remain 'INSERT'.
    Pls can u pls tell me how can I acheive this?
    Prashanth Deshmukh

    You cannot use Record Status like that.
    You need to create a procedure that loops through your entire block, keeping track of the pos and width of the prior record to calculate the new pos of each record.
    Your procedure would need to do something like this:
    Declare
        v_Pos  pls_integer := 1;
    Begin
      Go_block('B1');
      First_Record;
      Loop
        Exit when :System.record_status='NEW';
        :B1.pos := v_Pos;
        v_Pos := v_Pos + :B1.width;
        Exit when :System.last_record = 'TRUE';
        Next_Record;
      End Loop;
      First_Record;
    End;

  • Setting background color in multi record block

    Hi all!
    I've a table with around 150 records of colors with html-color-names and rgb codes.
    I would like to have a sample item in my form 9.0.4 to display the color as a preview for
    each record in a multi-record block when querying the table.
    I would not like to create a visual attribute for each color. So display_item() is no choice.
    (except: somebody show me how to create va's with the japi)
    Somebody knows a way to accomplish this?
    Thanks in advance and regards
    Stauder

    Here's a solution which should work :
    1. Use a mirror item for the numeric item which has to
    be displayed
    using the format mask based on value in column1
    The data type of the mirror item : Char
    X and Y co-ordinates : Same as the item
    on which it is
    mirrored
    Size and Height : Same as the item
    on which it is
    mirrored
    2. On normal display, Mirror item is displayed
    3. When Mouse-Click or Pre-Text Item trigger on the
    Mirror Item :
    - Use the Go_Item ('Actual Numeric Item');
    This will bring up the Numeric Item and the Mirror
    item goes in hiding
    - A VWI trigger on Numeric Item should Then be :
    If ( :col1 = 'A' ) Then
    :Mirror_Item :=
    To_char(:NumericItem, ',999,999.99');
    Else
    :Mirror_Item :=
    To_char(:NumericItem, '99999999');
    End If;
    4. A key-Next-Item (On Numeric Item) or other trigger ??
    should then
    use Go_Item (:Mirror Item) to bring forward the
    formatted numeric item
    -- Shailender Mehta --

  • Moving cursor on  multi-record block with pjc components

    Hi, this thread question is updated to a more specific and correct one in the new thread:
    Need help on using navigation function in when-custom-item-event trigger
    Please, follow there...
    I have a pjc on a multi-record block. When I activate the pjc the forms cursor does not navigate to the item.
    The when-custom-item-event is activated. My question is how do I move the cursor to the current record?
    Best regards,
    Constantin
    Edited by: ConstGl on Jan 11, 2011 5:47 AM

    +"... When I activate the pjc the forms cursor does not navigate to the item..."+
    Sorry, but this is not clear for me.
    Francois

  • Another multi-record block question

    I have always struggled with this. I have a muti-record block(10 records displayed). Eventhough my block is a db block, I have not assigned it a table. Hence, it is a non-db block. If I set enabled on a txt box, it
    is enabling the entire column. I need to enable only the text box on which the cursor is/user navigated to.
    How to do it?
    Thanks,
    Chiru
    Edited by: Megastar_Chiru on Sep 21, 2010 2:03 PM

    ok..here is the explanation of the issue
    in my multi-record block, there is a drop down list column with 2 values "Monthly %" and "Half-Rent". So, for example, in record 1, the drop-down could be chosen as "Monthly %" while in rec2, it could be "Half-rent". Right next to this list column, I have a text box. When the user chooses "Monthly %", the text box need to be enabled to allow keying a % value (say 5%). While in rec2, since the user chooses "Half-rent", the text box needs to be disabled for this record. How to accomplish this?
    Thanks,
    Chiru

  • About populating a non-database item in a multi-records block

    Hi, all
    I have a problem about populating a non-database item in a
    multi-records block. This block is set to database block with a
    controlled item which needs to be populated after query. so I
    create a post-query trigger, but my problem is when the records
    listed in this block are less than 10 ( the record number is set
    to 10), the trigger fires no problem. but when the retrieved
    records are greater than 10, the error message is 'post query
    trigger raised unhandled exception ora 01403'. anyone can help me
    fix this problem?
    Thanks in advance
    Diana

    Diana,
    When you have an unbound item in a block and want to fetch
    some data into it you need to write a post-query trigger.What
    you have done is right.But it seems that u are getting a No data
    found error.I am sure about how u r populating data into that
    field.If u have written a select statement to fetch the data in
    post-query trigger, kindly handle an exception and find out the
    problem.Having a look at ur code(pos-query) would be much more
    helpful for giving a better solution.Try this a let me know.
    Thanks
    Vinod.

  • No base table multi record block...updation

    hello all,
    i have a multi record block with two fields order & datetime to capture the time of the order. but this block is not based on any table. and i want to update another table with the datetime based on the order captured.
    how to do that...? there may be n number of records coming into the block at a time.
    thx in adv.
    Kris

    the best way is make it as a database block .and palace your insert statement in pre-insert trigger when you are inserting the record and place your update trigger in pre-update trigger u can also place your insert and update statement in back end, "i prefer the backend triggers").I think this is the best way because if you are using the go_block and next_record, that may take lots of time time to traverse record by record.
    regards
    mathew

Maybe you are looking for

  • Connect Laptop to a TV

    I have Satelite A215-s7437 and I would like to know what I need to hook my laptop to my TV. Any Suggestions? Also my DVD/VCR is Toshiba.

  • J1IIN

    hi friends..           while saving the excise invoice an error " error in updating j_1ipart2". is displayed.                But i have created excise invoices earlier, at that time no error was displayed.                    can anyone help me in rec

  • Acrobat 9 Standard crashing programs

    When loading Acrobat 9 Standard crashing programs. What do I do?

  • All 3d party applications stopped working

    Hi, After updating to 2.1, All applications that are not part of the default installation stopped working (again). I tried resetting, resyncing, nothing seems to help, except deleting and reinstalling all applications (sigh). are other people experie

  • Failed to install SUN cluster 3.1 8/05 on solaris 10(x64)

    I install the cluster 3.1 u4 on two nodes(node1 and node2) by using "scinstall".( The two nodes have the same system) After cluster installed, i reboot node2 . Before rebooting, I have done the following operation. # echo "etc/cluster/nodeid" >> /boo