How to Duplicate Item Value in a tablular Block

hi
Sometimes I have to copy the values of the items in just above (Previous)row to the next (New) row in a tablular block...
how to do that..?
thx in adv
Kris

you can also use the procedures , duplicate_record or duplicate_item.
consult forms builtin help for further assistance.
zaibi.

Similar Messages

  • How to set item values without using fields in branch's ACTION block?

    Okay, I will try to say this in a easy way so it is not weird.
    I have created a button, SAVE, that has a Branch of branch type: Branch To Function Returning A Page. This is my code for the branch:
    if :P2008_NAP_SUPPORTING_MATERIALS = 'Yes' then
    return '2092';
    else
    return '2040';
    end if;
    The code for this type of branch is stored in the ACTION block of the Branch page. The ACTION block for a Branch of branch type: Branch To Function Returning A Page is different than the ACTION block for a Branch of branch type: Branch To Page Or URL.
    I need to set some item values with some specific values, which I can do with a branch type: Branch To Page Or URL. This is not possible with the branch type: Branch To Function Returning A Page. The ACTION block is totally different.
    How can I set some values on say Page 2040 from Page 2008 without using fields in the branch's ACTION block?
    Thank you in advance,
    Maggie

    Andy and Scott,
    I love seeing different perspectives in solving problems, it opens my eyes to new ways of looking at/using the tools (reserved words and 'Function returning a Page', etc.).
    One of my pet peeves has been that on branches I was limited to only 10 variables to be passed (I know, who would want more - but there was an instance where I had to pass more), and an even more frustrating time when using report Column Linking, which limits me to 3 variables.
    At least with the Branch linking I can use your suggestion Andy and add the variable setting statements into the function. I am assuming of course (and I should be able to) that I will be able to set more that 10 variables in a IF condition prior to the RETURN statement. This method will be much more understandable, for me, when looking through the branch at a later time to see what is happening, than an URL link where all the variable are strung out 'in a line' so to speak.
    I will still need to use URL Target branching on Links contained within a Column Attribute when I need to pass more than 3 variables, of which I have several places where I do this.
    Thomas

  • How to pass ITEM:VALUE pair in ICON view link of Interactive Report

    When Icon View is enabled in an interactive report, you can display graphic images (blob data that are stored in the database) in 3 different views.
    1) View Icons
    2) View Report
    3) View Detail
    When you click on the displayed image in views 1 and 3 you navigate to a form to manage the row data and the image. By default it only passes the PK id of the row.
    How do I pass additional ITEM:VALUE pairs when navigating to the detail form page? I want to pass &APP_PAGE_ID. to the form page as well.
    There is an attribute under ICON VIEW called "Link Column" but if I put the "item:value" pair in the fields for this item's "ColumnLink" attributes, there is no effect.
    Also for bonus points...
    how do you make the ICON VIEW attributes, "HTML ALT Text" and "HTML TITLE Text" dynamic e.g. &ITEM. doesn't work here.
    thanks in advance
    Paul P

    For your link column, parse a link column in your query like so
    apex_util.prepare_url('f?p=M:53:'||:APP_SESSION||'::::P53_IMAGE_ID:'||i.image_id)Scott

  • How to set item values when redirecting to the same page.

    I just created a redirect button that I want to redirect to the same page and set the 2 page items on the page to the same value they had before the redirect.
    But I can't write:
    Set These Items: P1_Permit_Number,P1_Fishing_Year
    With These Values: &P1_Permit_Number.,&P1_Fishing_Year.
    Because there are no values in the session state, since a submit has not been done.
    So how do I do this?
    I know how to get the values stored in the items, e.g., $v('P1_PERMIT_NUMBER')
    but where do I place that command? It's not allowed under "With These Values"
    And I don't really want to make this a submit button and create a process that says:
    P1_PERMIT_NUMBER := $v('P1_PERMIT_NUMBER') because that would complicate the page too much -- I already have other processes and branches on the pages whose conditions would have to be modified so that they don't run during this scenario.
    Thanks.

    Thanks Gary and Andy. I rewrote the function according to above instructions:
    function redirectToURL()
    var permitNumber = document.getElementById('P1_Permit_Number');
    var fishingYear = document.getElementById('P1_Fishing_Year');
    var url = 'f?p=&APP_ID.:1:&APP_SESSION.::::P1_Permit_Number,P1_Fishing_Year:' + permitNumber +',' + fishingYear;
    window.location.href = url;
    But when I entered a value for permit number and fishing year and redirected, the word "null" appeared in the Permit page item, instead of the permit number that I had entered.
    Remember that I am not submitting here. So if the syntax you showed me, i.e. getElementById('P1_Permit_Number'), searches for the item's session state, then it will be wrong, since there is no session state value for the items at this point. Perhaps that is the reason I got the null?
    If so, what can I do?

  • How to duplicate Item

    Hi,
    I try to duplicate item with this code
                            Dim vItem As SAPbobsCOM.Items
                            Dim RetVal As Long
                            vItem = oCompany.GetBusinessObject(BoObjectTypes.oItems)
                            'Retrieve a record by its key from the database
                            If vItem.GetByKey("Art_Base") = True Then
                                'Set value to mandatory fields:
                                vItem.ItemCode = "MyNewItem"
                                'Set Value to other fields
                                vItem.ItemName = "MyNewItem Name"
                                vItem.InventoryItem = BoYesNoEnum.tYES
                                vItem.SalesItem = BoYesNoEnum.tYES
                                vItem.PurchaseItem = BoYesNoEnum.tYES
                                'Adding the Item
                                RetVal = vItem.Add
                                'Checking the result
                                If RetVal <> 0 Then
                                    oCompany.GetLastError(sErrCode, sErrMsg)
                                    MsgBox(sErrCode & " " & sErrMsg)
                                    BubbleEvent = False
                                    Exit Sub
                                End If
                            Else
                                oCompany.GetLastError(sErrCode, sErrMsg)
                                MsgBox("Failed to Retrieve the record " & sErrCode & " " & sErrMsg)
                                BubbleEvent = False
                                Exit Sub
                            End If
    It does not work, I have a message  in OITW.ItemCode
    Why ?
    Thanks

    Dear Didier LEVAN,
    You may try to duplicate the item via XML file by use
    oldItem.SaveXML -> change Item code, etc, in xml file ->
    newitem = oCompany.GetBusinessObjectFromXML(xmlfile)
    Best Regards
    Jane Jing
    SAP Business One

  • 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.

  • How to copy item value that contain a single quote(')?

    Hi,
    I have one "Copy" button in a APEX form. When user clicks it, it simply copy the item's values from the form to a new form by using APEX provided function behind the button- "Set these item values with these values". It is simple and works fine in normal cases. However, see, we have a text field called "Product Details", user types in for example "Oracle's new vision". When I click COPY button, APEX try to copy the text in "Product Details" field from this form to a new form but it returns error because of that single quote. Is there any way I can do something to replace that single quote with two single quote like we usually do in PL/SQL in the place "Set these item values with these values" of APEX button? I tried REPLACE(#P66_PRODUCT_DETAILS#., '''', '''''') but not work. I saw someone in the forum meantioned that to use something like "/#P66_PRODUCT_DETAILS#/" to get around. Any one with success?

    Thanks. I think it should work this way. However, our form has about 20 ~30 text fields, I have to create 20~30 hiddle fields to handle the problem because I never know which field could contain a single quote. Ideally, a new version of APEX should have the functionality to deal with the problem when using "set values with those values" method. At least, it should provide some kind of interaction for user to get away from single quote or comma or column etc.
    What I did is to get out of APEX native function and to create a new records in background by PL/SQL using record id that passed in from APEX form. It works perfectly. Although, user can only edit the record after it is created, not as user friendly as "Copy first-look at it-edit it-then create it" I originally planed.
    Thanks for your help,

  • How to use Item value in chart query

    Hi Folks,
    I am looking to use calander item value in sql query used to populate flash chart. I tried with following query where P2_DATE1 is the calander item name. This says no data found. I am not sure if I am missing some thing with BUTTON settings which I am using to put data into chart.
    Select null "link",to_date(entry_date,'dd-mon-yy hh:mi:ss') "Time in GMT", to_number(load_avg_5,'99.99') "Load Avg 5 Min" from oracle_ocm.top_load_avg --where trunc(entry_date)=:P2_DATE1
    I am new to APEX
    Please help

    Here are few things for you to try:
    Hardcode the value and see if it works. "where trunc(entry_date) = to_date('01-May-2010', 'dd-Mon-yyyy')". If it works, then click Session link at the bottom of the page, and check the value of the item P2_DATE1. If null, then you have a problem. If not null, please ensure that you use TO_DATE function as shown above with proper format mask.
    Good luck.
    Ravi A

  • How to pass item value when call a procedure

    Hi,
    I tried to display a blob image by calling a procedure,
    it's work if I hardcode the parameter, eg <img src="#OWNER#.download_my_file?p_id=1&p_picture=1" height=60 width=40 /img>
    but if I pass the p_id value with some page item value <img src="#OWNER#.download_my_file?p_id=:P_ITEM_ID.&p_picture=1" height=60 width=40 /img>
    the image don't display...is there anything wrong with my syntax?
    Thanks
    Vincent

    Vincent,
    The &P_ITEM_ID. must be in uppercase?Yes, exactly like I showed. Substitutions strings in Application Express must always be in upper case, no exceptions.
    Scott

  • How to find a value into a data block

    There is a way to find a value into a data block, like finding
    one into a record group
    null

    Rafael Moreno (guest) wrote:
    : There is a way to find a value into a data block, like finding
    : one into a record group
    Try something like this:
    -- has to be in a when-button-pressed or key trigger
    go_block('x_block');
    first_record;
    r_found:=false;
    loop
    if :x_block.search_field:=search_value then
    r_found:=true;
    exit;
    end if;
    down;
    end loop;
    if r_found=false then
    first_record;
    message('Value '

  • Duplicate item value in a Multi-Record Block

    Is there a way to chek duplicate value entered in multi record block?
    I have seen some solutions in this forum however nothing has worked for me till now. (using the formula, creating hidden items & creating group etc)
    Thanks in advance,

    To see if there are any other records in the block with the same value, use Kevin Clark's famous function to trap duplicates. You can find Kevin's function write up here:
    Re: checking for same rows in a tabular
    From Kevin's post:
    Create a field PK_COPY in a control block.
    Create program unit function COMPARE to compare two input params returning 1 if they match else 0.
    Create a field in the datablock PK_MATCH, calculation property formula, formula COMPARE(:DATA_PK, :PK_COPY)
    Create a field in the control block NO_OF_MATCHES, calculation property summary, summary type SUM, summarised
    item PK_MATCH.
    Also, your control block requires the Single Record property set to yes, and the base table block requires the Query All Records property set to yes.
    WHEN-VALIDATE-ITEM on DATA_PK
    :CONTROL.PK_COPY := :DATA_PK;
    if :NO_OF_MATCHES > 1 then
      message('You have already used that one');
      Raise form_trigger_failure;
    end if;

  • Interactive Report how to get Item Values

    Hi there,
    I have created a workflow which is going through 12 pages. At each page the user needs to choose his variables.
    This could be the y-axes, x-axes, amount, surname ... etc.
    The variables are given to the next page via branch to next page process. Everything works well until I need to create an interactive report out of the choosen variables.
    Lets say I have a variable called :P7_XAXIS with static LOV :
    Amount,Amount;Date,Date;quantity,quantity
    Page 8 is my IR. If I try :
    Select :P7_XAXIS  from mytable This will not work.
    But if I try
    Select Date from mytable This will work. Why? In my workflow there are several variables that can be used in a where condition. This also works. But I need to access the values before the condition and I also need to get a chart out of it.

    Even if I try
    Select (Select :P7_XAXIS from dual)  from mytable this will not work in my IR. Just getting no result.

  • How to change item value after re-loading the page.

    Hi all,
    I have two pages 1,2. From page 1 I am calling page2 (like LOV) by using callMyPopup and in page2 i am setting some variables and returns/refreshes to page1 refreshes using window.opener.window.location=new_url java script, at same time it pass few parameters to page1. How can I write some pl/sql code to show some message to user on page1. I mean I am returning some numbers so i want change into meaning full text. I tried processes no luck. Please help me.
    Thanks

    Hey James.
    Please share with everyone,
    Which version of Oracle Apex are you using?
    What is the Database version.
    and what is the Browser version and type?

  • How come the item value does not come thru via PL/SQL anonymous block?

    Hi,
    It's a Form with 3 tables -
    1) ClinicianProfileTb (with about 40 columns, insert/update via DML),
    2) PeopleTb (with about 7 columns, insert/update via PL/SQL anonymous block) and
    3) ClinicianPracticeTb (with about 10 columns, insert/update via PL/SQL anonymous block) for after-submit-processes.
    So I have several After-Submit-Processes. For some reason, it appears that PeopleId which is supposed to come thru via the 2nd After-Submit-Process (ie: Insert/Update PeopleTb) does not do the way it's supposed to. And when I press "Create" button at the bottom, I got the following error msg:
    ORA-01400: cannot insert NULL into ("TEST_0712"."CLINICIANPRACTICETB"."PEOPLEID")
    I tried the "debug" mode (via edit page link), but to no avail. (I'm newbie, trying to learn and deliver at the same time :)).
    I uploaded the app to apex.oracle.com, if someone could kindly take a look and let me know what goes wrong, it'd be greatly appreciated.
    workspace: test_0712
    app: 43408 - TEST
    user: demo
    pswd: demoPswd
    Page#21 -> look at the After-Submit-Processes -> in "Insert/Update PeopleTb" it appears that PeopeId does not come thru; thus it cannot be updated to ClinicianProfileTb.PeopleId (allows null) -> and thus cannot be inserted into ClincianPracticeTb.PeopleId (which does NOT allow null). Basically my logic is that in order to create ANY row in ClinicianPracticeTb, BOTH PracticeId AND PeopleId must be present.
    Acutally I should have used the PeopeTb as DML (as the driving table) to enforce that PeopleId must be present in order to insert ClinicianProfileTb and ClinicianPracticeTb, but it'd be lots of codes to write to insert/update in ClinicianProfileTb (40 columns).
    In addition, does ApEx consider EVERY SINGLE after-submit-process are in ONE transaction for commit/rollback? It appears that it treats all PL/SQL anonymous blocks are in ONE transaction, while Automatic Row Processing (DML) is commited/rolled back on its own?
    Thanks much,
    Helen

    All blocks that do not commit in one of the ways I detailed (and which do not explicitly commit using a commit statement) are part of the transaction started with > the first DML statement issued in any of the page processes and continuing until a commit is issued.Say, there are the following processes in the After-Submit-Processes:
    1. Process1 -> Automatic Row Processing (DML)
    2. Process2 -> PL/SQL anonymous block
    3. Process3 -> PL/SQL anonymous block
    Based on what you describe, in the event that if there is no explicit "commit" issued in any of these processes, then an implicit "commit" will be issued at the end of Process3?
    Thanks, Scott.
    Doreen

  • RPD: How to use multiple-value variables in initialization blocks ?

    Hi all,
    I have a set of initialization blocks required for authentication, two of which are running row-wise. The first one sets a multi-valued variable, and the second one uses this variable.
    Or at least, should use, because it actually fails. The NQServer log says
    [nQSError: 13011] Query for Initialization Block 'My_Init_Block_2' has failed.
    [nQSError: 23006] The session variable, NQ_SESSION.MY_VAR_1, has no value definition.
    My first variable is initialized in a basic row-wise initialization block. What's more, if I say my 2nd block isn't required for authentication, and I read in a narrative the contents of my first variable, it contains the set of value I expect it to have.
    can anybody please advise?
    thanks in advance!
    Cedric..

    There is an example in the OBIEE Server Administration manual that looks very similar to your code except that the whole of the valueof string is quoted:
    select
    NAME, VALUE from RW_SESSION_VARS
    where USERID='VALUEOF(NQ_SESSION.USERID)' {code}<br /><br /><br /><br />Pete                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • Accounting document generate by SES

    Hi, I have a service entry sheet with several services and I accepted flag to generate the accounting document. In some cases, The system generate a line for each service in accounting document, but I don´t understand why in other cases the system ge

  • How do I get this effect for my voice?

    I'm recording voice in Logic Pro. What would be the inserts for a soft, mellow, rich, full-sounding vocal track? Something along this line: http://www.youtube.com/watch?v=nzW3mc-Ac58&feature=related Thanks in advance! ND

  • Necessary SQL Server components

    Good day i have on different machines SharePoint2010 and MS SQL 2008 r2. A machine with the SQL is dedicated to SharePoint, so nothing else uses it. There are a number of services on the SQL server which i'd like to stop. Here they are: SQL server in

  • Firefox will not open, Shows in processing not in applications in task Mngr

    Fire fox won't open, but In HP task mngr, Showing as Processing but not in the Applications. Problem started when prompted to upgrade to 5.0 version

  • Error in Fill Index

    Hi All, I got this error today for Fill Index, after that I have tried Creating and filling Index, but no luck  as the status not changed after creating the Indexes. I thought this is the error between the HANA and BWA server. Can someone enlighted m