Set the value of the page elements using apex.submit

Hey,.

Does anyone have an idea how to set the value of several page elements using apex.submit?

Here is my request, she works for this element of the page, but I want to first the value of the other elements of the page (i.e. P30_SHOW_REF) as well.

select s.nr as NRR, 
'<input type="button" value="clickme2" onclick="document.getElementById(''BUTTONS'').style.display = ''block'';apex.submit({request:''SET'',set:{''P30_KLT_NR'':'||s.nr||'});"/>' Button 
from klant s

Thanks in advance!

Hi Julijan,

Here is the example:

apex.submit({
  request:"DELETE",
  set:{"P1_DEPTNO":10, "P1_EMPNO":5433});

Concerning

J

Tags: Database

Similar Questions

  • Interactive report with display of the icon to set the page element

    Hi all

    I am currently using Apex 4.2.4, I have an interactive report using icons, each icon has a link to another page but a few I want to set a value in a page hidden in the same page element which is then used as a variable for a classic report.

    I have this work via link href in the icon as f? p ='|| FA.page |': 1 :'|| : app_session |': P10_ID_ITEM :'|| FA.link_name without error.

    My problem is that I wanted to put the value of the element without using a link href that I could handle the clicked icon to change the background color so that the user can have a Visual representation, where it was clicked, then using the value of the page item appears the classic report in another region with a partial refresh.

    Any help is appreciated, thanks.

    Can you provide a detailed explanation of the purpose of this report and the logic used in the report query? What are the rules to control which icons appear in the IR, what icons link to the second report on the page of IR, and icons to link to separate pages?

    For me, the report query seems too complicated and inefficient by returning the data it does, and if another level of data is added to the hierarchy or more data is added to the second level, it fails with:

    ORA-01427: einreihig subquery returns multiple rows

    I'm guessing that the intent is that the IR displays only the icons at the top level of the hierarchy and icons for posting a link to a different page when they have no descendants, or to display the related lines in the secondary report below the IR when they do. I created a new page with the report query modified to a route of tree and keep the upper level lines. It is much more effective than the original query and simplifies the logic necessary for the verification of end-nodes. Instead of generating a URL link (which violates the separation of concerns), the query returns of the discrete values that can be used to implement the HTML link in the Icon View link Custom property:

    with icon_tree as (
          select
              ic.id_icon
            , ic.icon_name
            , ic.link_name
            , nullif(connect_by_isleaf, 1) is_parent
            , level depth
          from
              icons ic
                connect by
                    prior ic.link_name = ic.id_parent
                start with
                    ic.id_parent is null)
    select
        id_icon
      , icon_name
      , link_name
      , apex_util.get_blob_file_src('P10_ICON_IMAGE', id_icon) img_src
      , nvl2(is_parent, '586', link_name) target
      , nvl2(is_parent, 'P586_ID_PARENT', null) parent_item
      , nvl2(is_parent, link_name, null) parent_id
      , :app_id app_id
      , :app_session app_session
      , :debug debug
    from
        icon_tree
    where
        depth = 1
    

    In the interactive report, Use Custom Icon Link is set to Yes, and the custom link is:

    
      
      
    #ICON_NAME#

    Public static ID icons and results are applied to the IR and the regions second report respectively for use as selectors in action dynamics and CSS. The protected value property for the page P586_ID_PARENT element must be set to No for the value can be defined by a dynamic action.

    Dynamic action with several real actions is needed to bind alternatives click behavior to the links on the icons that have descendants (i.e. where the data-parent-id attribute has a value):

    Event: Click

    Selection type: jQuery Selector

    jQuery Selector:.apexir_WORKSHEET_ICONS a:not([data-parent-id=""])

    Real Actions

    Seq: 10

    Action: Delete the class

    Class:selected

    Selection type: jQuery Selector

    jQuery Selector:.apexir_WORKSHEET_ICONS a

    Seq: 20

    Action: Add the class

    Class:selected

    Selection type: trigger element

    Seq: 30

    Action: Set value

    Wait for result: Yes

    Type of value: Expression of JavaScript

    JavaScript expression:$(this.triggeringElement).attr('data-parent-id')

    Selection type: Agenda

    Point: P586_ID_PARENT

    Seq: 40

    Action: Discount

    Selection type: Region

    Region: results

    Seq:50

    Action: Show

    Selection type: Region

    Region: results

    Seq: 60

    Action: Cancel event

    Finally, add a style sheet to the Inline CSS property page. Initially, this hides the secondary report and select the parent clicked icon:

    #results {
      display: none;
    }
    #icons .apexir_WORKSHEET_ICONS a {
      border: 1px solid transparent;
      border-radius: 3px;
      padding: 0.8em 0 0.5em;
    }
      #icons .apexir_WORKSHEET_ICONS a.selected {
        border-color: #6a9cda;
        background-color: #bbd1ec;
        transition: 0.6s;
      }
    

    However, after all it is the question of why you use an interactive report here if you turned off all the features of the IR? A dynamic list with a custom template box seems to be more applicable?

  • Apex 5, call a modal page, set page elements, in values referenced title page elements are not the same (correct) than the item itself

    Hello

    Apex 5.

    IR (departments) on page 2 I want to open a modal page 3 (classic report) with the detail data (from emp) for a Masters depno via a link on depno column.
    In Page 3, I created two elements P3_DEPNO and P3_DNAME. These elements are defined in modal page 3 of page 2.
    When I do these two visible elements on page 3 I can see, the values are set correct according to the value in column (depno) link on page 2.
    However, I would like to place these element values in the page title of page 3
    Title: PGE for DepNo: & P3_DEPNO., DepName: & P3_DNAME.

    It happens that the values mentioned in the title of the page are not the same (good) as in the items himself.
    Initially, they are NULL. Only when I refresh page 2 the values change but remain the same (last called depno) as long as I'm doing a new refresh of page 2.

    I wonder how I can run to display the values of the correct point in the title of the page corresponding to the values of the correct page element (that I have hidden).

    Y at - it something more to do, or it could be a small bug?

    I've created a little demo app on
    https://Apex.Oracle.com/pls/Apex/f?p=75955:2

    WS: AMLWS001

    Demo/demo (developer is)

    Please see the report 1.

    Thank you in advance!

    André

    Hi andremi,

    andreml wrote:

    Hello

    Apex 5.

    IR (departments) on page 2 I want to open a modal page 3 (classic report) with the detail data (from emp) for a Masters depno via a link on depno column.
    In Page 3, I created two elements P3_DEPNO and P3_DNAME. These elements are defined in modal page 3 of page 2.
    When I do these two visible elements on page 3 I can see, the values are set correct according to the value in column (depno) link on page 2.
    However, I would like to place these element values in the page title of page 3
    Title: PGE for DepNo: & P3_DEPNO, DepName: & P3_DNAME.

    It happens that the values mentioned in the title of the page are not the same (good) as in the items himself.
    Initially, they are NULL. Only when I refresh page 2 the values change but remain the same (last called depno) as long as I'm doing a new refresh of page 2.

    I wonder how I can make it work to display the values of the correct point in the title of the page corresponding to the values point right page (what I have hidden).

    Y at - it something more to do, or it could be a small bug?

    Page title is rendered before the page elements, that is why is not highlighted in your title.

    I don't think directly, we can use the page as a page element value.

    Creates a copy of yours and made the change it new App id - 45390

    There, I created a static area without a model before your report area and put your article into that.

    then displayed title PGE for DepNo: & P3_DEPNO, DepName: & P3_DNAME. for the area of your report.

    Kind regards

    Jitendra

  • Can not set a value by the executed dynamic action on the page element "selection list."

    I created an agenda of the page 'list of selection' and I want to when I change a value in another element of the page set only 'screen '.

    I created a dynamic action on the page element "selection list" for this.

    These are the dynamic action attribute:

    When:

    ======

    Event: change

    Selection type: point

    Article: P29_PURCHASE_ORDER

    Condition: No strings attached

    Advanced:

    ========

    Scope of the event: static

    Identification:

    ==========

    Action: Set

    The ' Action Page when the changed value "attribute of the element of 'list of selection' = 'None', and when I run form the dynamic action run and set the value for once and do not update the value according to the change in the article"list of selection. "

    Note: when I change the previous attribute of 'Redirect and set', dynamic action run and properly value, but the value was hidden soon

    I want to value when the value of change of select list according to this change successfully.

    Please, advice me,

    Best regards

    Mustafa Ezzat

    Hello

    you set the value of the 'Page elements to submit' to P29_PURCHASE_ORDER?

    Then, the SQL statement would use the current selected value.

    This is the help text says: "specify a list separated by commas of the elements of the page that will be submitted to the server and therefore available for use in your"SQL statement"," PL/SQL Expression"or"Body of the PL/SQL function".»

    Kind regards

    Erik-jan

  • How to use the value of the page element in other pages too?

    Hi all

    How to pass the value of the item P26_NO from 26 to all other pages (such as 1, 2, 3... 25) using the & P26_NO. ???
    I set the default for this item.but I can't able to find value in the session state itself?

    Please post your suggestion here!

    Thank you and best regards,
    Robette.

    Robette wrote:
    Hi Amelia,.

    Through application process only we can able to save the page element value in session state? is there another way?
    Since my requirement is like I need to display footer text in all the pages, I have the version number included in this text, so I created a table and my intention to create an item and passing the point value for all other pages and see that point value & P26_NO. in the text. Version number is dynamic, it will change at each deployment.
    Is another way simple, other than my approach?

    Thank you best regards &,.
    Robette.

    You should use point demand for it and an application process to fill

    IF :APP_ITEM_NAME IS NULL THEN
      APEX_UTIL.SET_SESSION_STATE('APP_ITEM_NAME','myvalue');
    END IF;
    

    Published by: VC on June 25, 2012 13:48

  • Display the values of the Page element in HTML table

    Hi all

    could you please help me with the below? I want to have a table in the HTML area and to display in the table of elements of the Page of the page.

    I got the code like this:
    {
    < table >
    < tr > < td > & P1_ECEMEA_ASSISTANCE < table > < /tr >
    < tr > < td > & P1_ECEMEA_WIP < table > < /tr >
    < /table >
    }
    It shows the element of the Page names in the form of text, not the values.

    However, this code without the tags table:
    {
    ECEMEA request for Assistance of the CQT: & P1_ECEMEA_ASSISTANCE.
    ECEMEA CQT Work in Progress: & P1_ECEMEA_WIP.
    }
    Works and Page element values are displayed.

    Is it possible to display the values of the Page element in the HTML table at all or should I use a different method to show the values in a table? The above is only an excerpt of the code. I need to display about 30 items in Page, put in shape in a table with headers.

    Please let me know what kind of region is the best to use, or if I have to use only a few symbols of escape in the table code...

    Thank you and best regards,

    Vladimir

    Vladimir,

    Looks like you're missing the period after the substitution variables.

    {
    
    &P1_ECEMEA_ASSISTANCE.
    &P1_ECEMEA_WIP.
    }

    -D.

  • How to disable a page based on the value of another element on the Page element?

    Hello

    How can I turn a page element using javascript based on the value of another element on the page?

    Eg: P1_TEXT want to be disabled if the value in P1_LCOK = "LOCK".

    How can I do this using javascript. I want this implemt on loading the page.

    Kind regards
    Benz

    Put this function in the page header:

    
    

    and call it in the footer:

    f_disable_item;
    

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

  • JavaScript allows you to change the value of the page element?

    How to use JavaScript to change the value of the page element?
    I can read the value of the page element.

    I can change it by JavaScript?

    Thank you.

    David

    Depends on what is the type of page element - for text/no Select something like:

    function setValue(){
      $x('P1_FIELD').value = 'Oracle';
    }
    

    For a select element, something like this:

    function setSelectValue(){
      html_setSelectValue('P1_SELECT', 'Oracle');
    }
    
  • assign a value to a text element using the PL/SQL function body

    Hello

    I want to assign a value to a text element using PL/SQL function body option in the Source elements. But the below error when I try to apply it.

    Source code:

    declare
    name varchar2 (100);
    Start
    If v ("P3_CREHIDD") = 'Edit' then
    Select ename in the name of cpy_emp where empno = v('P3_EMPNO2');

    end if;
    end;


    ERR-1904 unable to calculate the default item: type = computation_type = function body declare name varchar2 (100); so start v ('P3_CREHIDD') = 'Edit' and then select ename in the name of cpy_emp where empno = v('P3_EMPNO2'); end if; end;.

    Thank you
    David.

    Hello

    Your body of the function doesn't return anything.
    Maybe it works

    declare
      l_name varchar2(100);
    begin
      if v('P3_CREHIDD') = 'Edit' then
        select ename
        into l_name
        from cpy_emp
        where empno = v('P3_EMPNO2');
      end if;
      RETURN l_name;
    end;
    

    BR, Jari

  • Result passage of PL/SQL code for the page element

    Hello

    I have created a process in after the header to fill data to the page of the form elements.  The pl/sql code is like bellows.  Then I got the error message:

    ORA-06502: PL/SQL: digital or value error: character number conversion

    My question is that I do not see the difference in format between the page element and block pl/sql variables (e.g. : P31_STUDY_ID vs v_P31_STUDY_ID), they are either numeric or text field (in fact I have hidden field, but don't see conversion back to the digital field solved the problem).  And don't see needs to set the format mask.  Is there another way to detect the column that causes the problem, or if there is a syntax error with my assignment (from the variable element on the page)?  Thank you very much!

    ============================

    Declare

    number of v_P31_STUDY_ID;

    number of v_P31_STUDY_SITE_ID;

    v_P31_STUDY_SITE_NAME VARCHAR2 (255);

    v_P31_STUDY_SITE_NUM varchar2 (10);

    number of v_P31_STUDY_SITE_NAME_NUM_ID;

    number of v_P31_STUDY_SITE_OPEN_STATUS;

    v_p31_comments VARCHAR2 (255);

    Start

    Select

    tbl_study_site.study_id,

    tbl_study_site.study_site_id,

    study_site_name,

    study_site_num,

    STUDY_SITE_NAME_NUM_ID,

    STUDY_SITE_OPEN_STATUS,

    Comments

    in

    v_P31_STUDY_ID,

    v_P31_STUDY_SITE_ID,

    v_P31_STUDY_SITE_NAME,

    v_P31_STUDY_SITE_NUM,

    v_P31_STUDY_SITE_NAME_NUM_ID,

    v_P31_STUDY_SITE_OPEN_STATUS,

    v_p31_comments

    of tbl_study_site, tbl_study_site_attrib

    where tbl_study_site.study_id =: p30_study_name

    and tbl_study_site.study_site_id = tbl_study_site_attrib. STUDY_SITE_ID

    and tbl_study_site_attrib. STUDY_SITE_ATTRIB_ID =: P31_STUDY_SITE_ATTRIB_ID;

    : P31_STUDY_ID: = v_P31_STUDY_ID;

    : P31_STUDY_SITE_ID: = v_P31_STUDY_SITE_ID;

    : P31_STUDY_SITE_NAME: = v_P31_STUDY_SITE_NAME;

    : P31_STUDY_SITE_NUM: = v_P31_STUDY_SITE_NUM;

    : P31_STUDY_SITE_NAME_NUM_ID: = v_P31_STUDY_SITE_NAME_NUM_ID;

    : P31_STUDY_SITE_OPEN_STATUS: = v_P31_STUDY_SITE_OPEN_STATUS;

    : P31_COMMENTS: = v_p31_comments;

    end;

    =============================

    Identify the root cause. He's always on the format of the column, there is an error.  Thanks for your help.

  • How to set the main element of Classification

    HR dear gurus,.

    Is there a way to define the primary item class? I am not able to find any user interface that will allow me to set the main element of Classification. We are 12.0.4.

    Concerning
    Rajesh Merlin

    Hello

    You cannot create a primary classification.
    They are seeded legislation.
    Everything you create is seeded secondary classifications under each of the primary classifications.

    Many scales using seeded at primary/secondary school planted classifications.
    For example, if Oracle allows the customer to create a new primary classification, then sales would go wrong.
    And balances are widely used in Oracle Payroll.
    In short, no new primary classifications.

    Why do you want to create a new primary classification?
    What is the requirement?

    See you soon,.
    VB

  • How to position the page element?

    Hello

    I created a report in the same region, has also created a page element in the same region. The page element is now on the top of the report, but I need to show in the report. How can I achieve that?

    Thank you

    Victor

    Depends on your version of the apex. 4.1/4.2ish there is an attribute on the region of the "Position of the display element.

    Enter this below content.

  • Send page element using AJAX

    Hi all

    Thanks for any help in advance.

    I am currently submitting an item in the session using AJAX iin version 4.1

    I have an application process that matches a request on: run this application process when requested by a process page.
    begin
      :P4_FISCAL_YEAR2 := :AJAX_4_FISCAL_YEAR2;
    end;
    Then, in the order of the day: P4_FISCAL_YEAR2 have the form html attributes defined for element:
    (also the page element is set to None (Default) on the action of the page when the value is modified.
    onchange="selectChanged6(this)"
    and a process of page
    <script type="text/javascript">
    function selectChanged6(filter)
    {
    var get = new htmldb_Get(null,$v('pFlowId'), 'APPLICATION_PROCESS=SET_4_FISCAL_YEAR2',0);
    get.add('AJAX_4_FISCAL_YEAR2', filter.value);
    var ret = get.get();
    }
    </script>
    The question does not appear in the session and I can't understand why, thanks
  • LOVs using cascading on the Page elements with values exceeding 4000 characters

    A few days ago, I asked a question on the community, but it turned out that there was something wrong with my account and they have removed the item, so I'll just post the solution I found here now:

    Well, I found a way to use LOVs cascading on page elements with values exceeding 4000 characters:

    Let's say I have a shuttle named P1_ORGANISATIE with "List of values" box, a dynamic LOV named "Source: lists of values Query" containing the value:

    Select NAAM as display_value, ID like return_value

    of NINEHAM

    order by 1

    If the number of records-NINEHAM is insufficient, the length of the value of P1_ORGANISATIE, which is a list of concatenated with colon separated digital ID, can exceed 4000 characters.

    Now, suppose I have a list of selection called P1_TEST that is connected through "List of values"-> "Cascading LOV Parent article (s)" with P1_ORGANISATIE, using a named LOV dynamic with "Source: lists of values Query" containing:

    Select distinct TST. NAAM as display_value, TST.ID as return_value

    of the OTE NINEHAM

    Join the AFDELINGEN ADG ON (ADG. OTE_ID = OTE.ID)

    Join the DEELNEMERS DNR ON (DNR. ADG_ID = ADG.ID)

    Join TESTDEELNEMERS TDR WE (TDR. DNR_ID = DNR.ID)

    Join TESTEN TST ON (TST.ID = RDT. TST_ID)

    where instr (":" |: P1_ORGANISATIE |) '':'', '':'' || OTE.ID | :'') > 0

    order by 1

    In this case, when P1_ORGANISATIE exceeds 3998 characters, you'll get an "ORA-01704: string literal too long"-error and the P1_TEST will show an element called "undefined".

    A way around this is possible because for a named LOV, you can use a "function that returns a sql query" instead of a simple sql query. In other words, we can apply in the context of PL/SQL and thus have maximum for expressions of 32767 instead of 4000 characters. In addition, it is possible to use the two APEX_UTIL. STRING_TO_TABLE and APEX_COLLECTION.

    Setting "Source: lists of query values" on the LOV appointed to P1_TEST with the following code will work:

    DECLARE

    l_selected APEX_APPLICATION_GLOBAL. VC_ARR2;

    l_qry varchar2 (32767): =.

    "Select distinct TST. NAAM as display_value, TST.ID as return_value

    of the OTE NINEHAM

    Join the AFDELINGEN ADG ON (ADG. OTE_ID = OTE.ID)

    Join the DEELNEMERS DNR ON (DNR. ADG_ID = ADG.ID)

    Join TESTDEELNEMERS TDR WE (TDR. DNR_ID = DNR.ID)

    Join TESTEN TST ON (TST.ID = RDT. TST_ID)

    $1

    order by 1';

    BEGIN

    IF: P1_ORGANISATIE IS NULL

    OR LENGTH(:P1_ORGANISATIE) < = 4000

    THEN RETURN

    Replace (l_qry

    ,'$1'

    ,' where instr (":" |: P1_ORGANISATIE |) '':'', '':'' || OTE.ID | :'') > 0'

    );

    ON THE OTHER

    l_selected: = APEX_UTIL. STRING_TO_TABLE(:P1_ORGANISATIE);

    APEX_COLLECTION. CREATE_OR_TRUNCATE_COLLECTION (p_collection_name = > 'ORGANISATIE_COLLECTIE');

    FOR id IN 1.l_selected.count

    LOOP

    APEX_COLLECTION.add_member (p_collection_name = > 'ORGANISATIE_COLLECTIE')

    , p_n001 = > to_number (l_selected (id))

    );

    END LOOP;

    RETURN

    Replace (l_qry

    ,'$1'

    ,'join apex_collections ON APC (APC. COLLECTION_NAME = "ORGANISATIE_COLLECTIE" AND APC. N001 = OTE.ID)"

    );

    END IF;

    END;

    Andreas Groenevelt says:

    A few days ago, I asked a question on the community, but it turned out that there was something wrong with my account and they have removed the item, so I'll just post the solution I found here now:

    Something was wrong with the whole site: AP invoice tolerance

    I don't post anything substantive until we find out what is happening.

  • How to get the value of the global element using javascript or ajax!

    Hello!

    How can I read at global(point application created in the shared components) using ajax or javascript?
    You can imagine that I need to get the value of this element by function as:
    -----
    Function getText() {var itemVal = $x ('MY_GLOBAL_ITEM') .value;}  Return itemVal; }
    -----
    .. .but I can't do it because it is not made to couse of the page it is global element! so, anyone know no work around to do?
    I know that I can make point page and read the value of that, but not what I really need!
    If I have 100 pages and all pages need to use my function, it would take 100 Articles :) - that's why its no good average!

    Please, share your ideas!

    THX

    Rafix,

    You must use a little AJAX to retrieve a request element value. Three steps in this solution. Implementation of a callable JavaScript function, creating an application process on the request and call the JavaScript function with dynamic action.

    1 set up a JavaScript function that can be called by:

    This function calls the process of application level which has a visibility of the element of your application and then returns the value of points.

    Edit your page and JavaScript code according to the code in the 'function and Variable global statement' of your page. You can also add to the model page, that you use, but you also have to encapsulate this code in the script tags.

    getAppItem = function(pItemName){
        var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=GET_APP_ITEM',$v('pStepId'));
        get.addParam('x01',pItemName);
        gReturn = get.get();
        get = null;
        return gReturn;
    }
    

    2. creating an application on request process:

    The application of level process has visibility to your application-level element. It is to retrieve the value of points and it prints the htp buffer. Essentially, this acts as a way to return the values of AJAX calls (the javascript function we set previously);

    go to the shared components > procedures > Create.

    Point process: "We Demand: run this application...". »
    Name: GET_APP_ITEM
    Type: Anonymous PL/SQL block

    declare
       -- get the item name passed into the JavaScript function.
       app_item_name varchar2(30) := apex_application.g_x01;
    begin
        -- print its value to the buffer
        htp.p(v(app_item_name));
    end;
    

    3. call the JavaScript function with dynamic action:

    The function call allows to specify an application-level element name and have its returned value. The trigger event is specific to what you need, but the action must be of type to run JavaScript code. In my case immediately the value of P1_NUMBER to my value of demand points. This code doesn't have to be in a dynamic action, but it helps to stay organized. you could call it from any script tag.

    $s('P1_NUMBER',getAppItem('MY_APP_ITEM'));
    

    See you soon,.
    Janet Tyson

Maybe you are looking for