Dynamic action - update

Re: Anthony sample application to demonstrate the dynamic action http://apex.oracle.com/pls/otn/f?p=39830:38

It seems that native dynamic action Refresh (currently limited to the refresh of the regions report) simply refresh the content of the report by re-running the query. But if the region has text strings using the & POINT. Notation (for example in the header, the footer, or title), which is not updated.

Am I missing something or is this a limitation of the Refresh action conceived as it is? I'm sure that the Apex Team plans to improve it in the next version, but is there a way to DIY in this version?

Thank you

Hi Vikas,

Yes you are right that "Refresh" will just refresh the main region component. For example the report or in the future chart. But it won't refresh the content of the entire region.

1. the reason for this is that a region may also have page elements that save session state are entrusted to him. If us would be updated to a region, the internal mapping of the name attribute of the INPUT tags could change based on conditions screen which screws up the whole would submit the treatment.

2. the updating of the partial page regions (and in the future for graphics) only run the SQL statement set for component there and is the logically defined set for page rendering (for example, calculations, process,...). If a region would now use & Pxxx_TEST. to reference session state in the content of the region it would most likely be NULL or return a value of false if the values were recovered by an extraction process DML during page rendering (which simply writes in memory).

Therefore we must consider whether we support in the future and perhaps allow him to some extent in place.

Concerning
Patrick
-----------
My Blog: http://www.inside-oracle-apex.com
APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf

Tags: Database

Similar Questions

  • dynamic action sets the value of the element, but not save to DB on submit

    I'm working on a page where the value of several to show only the page elements are defined using a dynamic Action.  They are set when the user selects a value in a list of selection (and is based on the value of the selection list).  Dynamic action is triggered on a list selection change event and then runs the real action "set the value.  The selection list displays the names of sales representative.  The three fields dynamically filled are the org structure (that is, their chain management).

    For the action to set the value, I use a defined Type of SQL statement:

    Select VP, DIR, MGR

    of SALES_ORG where SSR =: P20_SSR

    In the affected elements, I have fixed Type of selection to the 'item (s)"and the value of the Item (s) for 'P20_GVP, P20_DIR, P20_MGR.

    Dynamic action works fine for the display of the page (that is, when I select a sales representative in the selection list dynamic action properly updated only display value fields three).  This page is a form in which the user submits information relating to the rep.  When the page is sent, all fields are filled in a new record of DB with the exception of three that were populated dynamically above.  These fields get the values NULL.

    When the dynamic action updates the values in the three fields is - it does not set the value of session?  Why these fields don't are not taken into account in the submit other ideas > process Page?

    I use 5 APEX with Chrome on Mac (Yosemite).

    Thanks for the note.  I didn't only display the items could not be used in this way.  I think I'll take a different approach with the design; given that the org structure is in another table that I can simply refer to that by rep when necessary rather than saving the information uploaded to the page of the form.  The reason why I have not fill the screen only the points of loading the page is because I don't know what the values should be until the user selects a sales representative in the selection list.

    I'll change the design to one of the following:

    1) change the display only items of standard text field.  NOTE: if I make the text read-only field that causes other problems when loading (I get the message "violation of protection Session state").

    OR

    2) do not include org structure in the download folder and just refer to table org Rep when necessary.

    Thank you!

    Steve

  • refresh the report with dynamic action title

    Hi all

    I have a report that is updated with dynamic action. When the update is done, first the value of two hidden variables are defined (P2_ID and P2_NAME) and are subject (using a dynamic action type "pl/sql", with the code "null"; and items to submit page: P2_ID, P2_NAME).

    In the report query, I use: P2_ID in the where clause. Everything works like a charm! The only thing that doen't work, is the title of the region: which is defined as "properties of & P2_NAME.", but the title is not updated when the report is refreshed.

    Is there a solution for this? I hope I am clear enough.

    See Re: dynamic action - update

    If you are right; the native just Refresh action updates the content of the report, it does not perform & POINT. substitutions throughout the region.

    What you could do is use a RANGE named as the title as

    &P2_NAME.
    

    and add a REAL action to your dynamic Action to set the title using Javascript to run code

    $s('my_title',$v('P2_NAME'));
    

    I hope this helps.

  • Dynamic action for button update region

    Hi all, how to create a dynamic action for button update region. Suggest me

    Thank you

    Apex-Obin wrote:

    Thank you... with over loading the entire page?

    Updating of dynamic actions using partial page refresh (PPR). However it is supported only on certain types of region: traditional and interactive reports, graphics and plug-ins where PPR support has been implemented by the developer of plug-in. The model of the region must also include an id = "" #REGION_STATIC_ID # "attribute, which means that the model region cannot set model No."

  • Service update in relation to the dynamic Action

    Hello

    Oracle 11 g 2, APEX4.2.4, Oracle HTTP Server 10g

    I have a report:

    SELECT empno, ename, sal, APEX_ITEM. POPUPKEY_FROM_QUERY (1, deptno, 'SELECT dname, deptno FROM dept') department.

    saveme null

    WCP

    Image 2.png

    I want to click on the link "saveme" and update the value of the Department of this record with AJAX. (Execute the pl/sql in DA)

    Can I get the primary key of the record and assign an element with DA. (P24_EMPNO)

    can I run a PL/SQL in DA and want to update the value of the Department which has been changed.

    It's my PL/SQL in DA (PL/SQL execution):

    Start

    because me in 1... apex_application.g_f01. Count

    loop

    Update emp

    Set deptno = apex_application.g_f01 (i)

    where empno =: P24_EMPNO; -I can gee the value of PK and place it in this article

    ;

    end loop;

    end;

    Image 003.png

    Any idea please?

    rayanico wrote:

    I get the EMPNO value like this:

    Add the attribute for link attributes: id = "" #EMPNO # "so my link looks like this:"

    then I get this by javascript and set it on the P24_EMPNO.

    so, I have KP. current

    Hmmm. I expected that you would be using jQuery crossed...

    but, on my Popup LOV:

    Edit users and I should get the current value of popup LOV.

    as you know, is not an ELEMENT, and I can't do it like EMPNO.

    How can I get the value of that?

    Using the route above jQuery in a dynamic action step Execute the JavaScript Code :

    var deptNo = $(this.triggeringElement).closest('tr').children('[headers="DEPARTMENT"]').find('input[name="f01"]').attr('value');
    apex.item( "P24_DEPTNO" ).setValue(deptNo);

  • Dynamic action not updated report every time

    Hi guys,.

    I have a page which downloads statspack reports from different servers and stores them in the APEX. As well as this, it also displays a summary of the data (top 5 events of wait & load profile info) where flat an icon: http://oi40.tinypic.com/295uxxg.jpg

    The table will refresh and display the data according to the value of P10_SNAPVAL (storage of the PK value).

    It is not that I expect to do the report (it is not updating the table). I have the following:

    Area PL/SQL dynamic content making the report

    Dynamic action

    -Event: change

    -Item: P10_SNAPVAL

    -Action: update

    -Element affected: Region - load (dynamic PL/SQL content) profile

    -Field of application event: I tried as well bind & live

    The value of P10_SNAPVAL is changed whenever the user place an icon of Penguin (this works because the graphic works).

    Anyone know why my current setup does not work with the table/how fix?

    Edit: It's something to do with me changing using javascript?

    $('img[name=summary]').mouseover(function() {
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value, null,10);
    get.add('P10_SNAPVAL',$(this)[0].id.substring(3));
    var gReturn = get.get();
    document.getElementById('P10_SNAPVAL').value = gReturn;
    $("#c9485413559485976").show();
    $("#loadtab").show();
    });
    
    
    

    Edit 2: I tried:

    jQuery('#apexir_WORKSHEET_REGION').trigger('apexrefresh');
    

    and each apexir_WORKSHEET_REGION down id (apexir_REPORT, apexir_WORKSHEET, apexir_DATA_PANEL, 9587216508806437) but it is not updated the table of values for any of them. I thought that this call was made for normal day and reports of the IR, but I tried normal, he passed to IR and it is not refreshing. No errors in JS (according to firebug)

    On page 2, I changed:

    report area model was "no model", changed to "borderless region" - there must be a model.

    and changed the static ID of the area to "report_updrep" - because in javascript, we use this ID.

    Look, it works.

  • helps with the update of tabular form using dynamic Action

    Hello world

    I'm trying to simplify a tabular presentation based on a collection so that it uses more dynamic actions that will be ultimately more easy for us to debug.

    Our tabular presentation is based on the query:

    SELECT
    apex_item.text(1,seq_id,'','','id="f01_'||seq_id,'','') "DeleteRow",
    seq_id,
    seq_id display_seq_id,
    c003,
    c004,
    c005,
    c006,
    apex_item.text_from_LOV(c004,'SPECIES')||'-'||apex_item.text_from_LOV(c005,'GRADE')||'-'||apex_item.text_from_LOV(c006,'MARKETCODE')||'-'||apex_item.text_from_LOV_query(c007,'select unit_of_measure d, unit_of_measure r from species_qc') unit,
    apex_item.select_list_from_LOV(8,c008,'DISPOSITIONS','onchange="getAllDisposition('||seq_id||')"','YES','0','  -- Select Favorite --  ','f08_'||seq_id,'') Disposition,
    apex_item.select_list_from_LOV(9,c009,'GEARS','style="background-color:#FBEC5D; "onFocus="checkGearPreviousFocus('||seq_id||');"onchange="getAllGears('||seq_id||')"','YES','3333','-- Select Favorite --','f09_'||seq_id,'') Gear,
    apex_item.text(10,TO_NUMBER(c010),5,null, 'onchange="setTotal('||seq_id||')"','f10_'||seq_id,'') Quantity,
     
    apex_item.text(11,TO_NUMBER(c011),5,null,'onchange="getPriceBoundaries('||seq_id||')"','f11_'||seq_id,'') Price,
    
    apex_item.text(12, TO_NUMBER(c012),5,null, 'onchange="changePrice
    ('||seq_id||')" onKeyDown="selectDollarsFocus('||seq_id||',event);"','f12_'||seq_id,'') Dollars,
     decode(c013,'Y',apex_item.text(14, c014,30,null,'style="background-color:#FBEC5D;" onClick="onFocusAreaFished('||seq_id||');"','f14_'||seq_id,''),'N','N/A') Area_Fished,
    c014,
    c015,
    c016,
    c017 additional_measure_flag,
    decode(c017,'Y',apex_item.text(18, c018,4,null,'style="background-color:#FBEC5D; "onBlur="setUnitQuantity('||seq_id||')"','f18_'||seq_id,''),'N','N/A') UNIT_QUANTITY,
    decode(c017,'Y',apex_item.text(19,'CN',3,null,'readOnly=readOnly;','f19_'||seq_id,''),'N','N/A') UNIT_COUNT,
    c024 fins_attached,
    apex_item.textarea(28,c028,3,null,'class="hms_info"','f28_'||seq_id,'') Explanation,
    decode(c024,'N',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','class="hms_info"''onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'U',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'Y','N/A') Nature_Of_Sale,
    c030,
    c031,
    c032,
    c033,
    c034,
    c035,
    c036,
    c037,
    c038,
    c039,
    apex_item.select_list_from_LOV(40,c040,'HMS_AREA_CODE','style="background-color:#FBEC5D;" class="hms_info"
    ',null,null,null,'f40_'||seq_id,'')  HMS_AREA_CODE,
    c020 hms_flag,
    apex_item.text(41,TO_NUMBER(c041),5,null, 'class="hms_info"','f41_'||seq_id,'') Sale_Price,
    c042,
    c043,
    c044,
    c050 shark_flag
    from apex_collections
     where collection_name = 'SPECIES_COLLECTION' order by seq_id 
    

    Note that many of the fields referenced are c0xx... and really serve as place holders so that the c0xx = fxx.  It's awkward, like every time that a movement or move a column, it upsets the fxx value.   So, I tried to use the CLASS if possible.

    I have a dynamic action that had worked perfectly, until I moved one of the columns... and now, it seems not to work when I'm trying to update anything with the HMS_INFO or SHARK_INFO class.  Grrr.

    dynamic action: CHANGE COLUMN

    event: CHANGE

    selection type: JQUERY SELECTOR

    jQuery selector: input [name = 'f10'], input [name = 'f11'], input [name = 'f12'], input [name = "f24"], textarea [name = "f28"], select [name = "f40"], input [name = "f41"]

    true action1: defined value, expression javascript, set P110_ID = this.triggeringElement.id

    true action2: defined value, expression javascript, set P110_VALUE = this.triggeringElement.value

    true action3: run pl/sql,.

    declare
      v_attr number;
      v_seq number;
    begin 
      v_attr := TO_NUMBER (SUBSTR (:p110_id, 2, 2));
      select ltrim(substr(:p110_ID,5,4),'0') into v_seq from dual;
     
      safis_collections.update_column(v_seq,
                                      v_attr,
                                      :p110_value);
    end;
    

    the safis_collections.update_column package is:

    procedure update_column(v_seq in varchar2,
                            v_attr in number,
                            v_value in varchar2)
    is
    begin
       apex_collection.update_member_attribute (p_collection_name=> 'SPECIES_COLLECTION',
                         p_seq => v_seq,
                         p_attr_number => v_attr,
                         p_attr_value  => v_value);
    apex_debug.message('updated column. seq='||v_seq||' attribute='||v_attr||' with '||v_value);
    
    end;
    

    I wonder if there is a way to make the CLASS in my JQUERY SELECTOR, so something like reference entry [class = "HMS_INFO"], input [CLASS = "shark_info"]... and if so, what happens if a single item in the class is an option button and the other is a selection list and the other an element?

    is it possible to not have to rely on the fxx.  Currently, my collection columns map to the investment in the form of tables... sense, c024 = f24... because I placed c024 to be the 24th editable column, but this seems crazy.  Is there a simpler way?  I'm just learning class, then maybe there is something extra, or rather that I could use...

    any help is appreciated.   Thank you!

    I think I have solved the problem.

    dynamic action: CHANGE COLUMN

    event: CHANGE

    selection type: JQUERY SELECTOR

    jQuery selector: input [name = 'f10'], input [name = 'f11'], input [name = 'f12'], .shark_info, .hms_info

    true action1: defined value, expression javascript, set P110_ID = this.triggeringElement.id P110_VALUE POINT KEYS

    true action2: run pl/sql code

    begin
    null;
    end;
    

    items to submit page: P110_ID

    true action3: defined value, expression javascript, set P110_VALUE = this.triggeringElement.value P110_VALUE POINT KEYS

    true Action4: value: PL/SQL expression, the value P110_SEQ = rtrim (substr(:P110_ID,5,4),'0 ') CONCERNED POINT: P110_SEQ

    true Action5: run pl/sql code

    declare
    
      v_attr number;
    
    begin
      v_attr := TO_NUMBER (SUBSTR (:P110_id, 2, 2));
    
      apex_collection.update_member_attribute
                       (p_collection_name      => 'SPECIES_COLLECTION',
                        p_seq                  => :P110_SEQ,
                        p_attr_number          => v_attr,
                        p_attr_value           => :P110_VALUE);
    
    end;
    

    items to submit page: P110_ID, P110_VALUE, P110_SEQ

    true action6: refreshment area

    I think it is the combination of the use of pl/sql expression to calculate P110_SEQ and also your tip on TRUE ACTION2 to submit the item that did the trick.

    Thanks Kofi, for your patience and help!  It was great.

    Ugh... on the next issue.

    Karen

  • help on the use of dynamic action to update the items in a table (more precisely, the radio button) based on the collection

    Hi everyone, I posted this question in the past and made huge strides with the help of Denes Kubicek: https://apex.oracle.com/pls/apex/f?p=31517:294:115851992029365: based on my previous question posted: https://forums.oracle.com/forums/thread.jspa?threadID=2537494

    I'm fighting with a single element in my tabular presentation.  There is a radio button.  The choices all seem correctly, but the value is not saved in the collection (and therefore not recorded in the table).  All the other elements in the form of tables to record properly.

    Here's what I have for the query.   This is element c024 (which maps to;) ("F03'), which is defined as a radio based on an existing LOV LOV.

    Currently I have:

    2 items on the page:

    P110_ID

    P110_VALUE

    Dynamic action called COLUMN of CHANGE:

    event: CHANGE

    selection type: jQUERY Selector

    jQuery:

    Select jQuery = input [name = "f03"], select [name "f08"], select [name = "f09"], input [name = 'f10'], input [name = 'f11'], input [name = 'f12'], select [name = "f40"], input [name = "f21"], input [name = 'f22'], input [name = "f23"], input [name = 'f50']

    scope of the event: Dynamics

    real action #1: set the P110_ID javascript expression this.triggeringElement.id

    real action #2: set the P110_VALUE javascript expression this.triggeringElement.value

    action 3: run pl/sql code

    declare
      v_member number;
      v_seq number;
    begin 
      v_member := TO_NUMBER (SUBSTR (:p110_id, 2, 2));
      select ltrim(substr(:p110_ID,5,4),'0') into v_seq from dual;
      safis_collections.update_column(v_seq,
                                    v_member,
                                    :p110_value);
    
    
    

    refreshment area true creation #4: LANDINGS_COLLECTION

    the tabular presentation is based on the query:

    SELECT
    apex_item.text(1,seq_id,'','','id="f01_'||seq_id,'','') "DeleteRow",
    seq_id,
    seq_id display_seq_id,
    apex_item.text_from_LOV(c004,'SPECIES')||'-'||apex_item.text_from_LOV(c005,'GRADE')||'-'||apex_item.text_from_LOV(c006,'MARKETCODE')||'-'||apex_item.text_from_LOV_query(c007,'select unit_of_measure d, unit_of_measure r from species_qc') unit,
    apex_item.select_list_from_LOV(8,c008,'DISPOSITIONS','onchange="getAllDisposition('||seq_id||')"','YES','0','  -- Select Favorite --  ','f08_'||seq_id,'') Disposition,
    apex_item.select_list_from_LOV(9,c009,'GEARS','style="background-color:#FBEC5D; "onFocus="checkGearPreviousFocus('||seq_id||');"onchange="getAllGears('||seq_id||')"','YES','3333','-- Select Favorite --','f09_'||seq_id,'') Gear,
    apex_item.text(10,TO_NUMBER(c010),5,null, 'onchange="setTotal('||seq_id||')"','f10_'||seq_id,'') Quantity,
    apex_item.text(11,TO_NUMBER(c011),5,null,'onchange="getPriceBoundaries('||seq_id||')"','f11_'||seq_id,'') Price,
    
    apex_item.text(12, TO_NUMBER(c012),5,null, 'onchange="changePrice
    ('||seq_id||')" onKeyDown="selectDollarsFocus('||seq_id||',event);"','f12_'||seq_id,'') Dollars,
    decode(c013,'Y',apex_item.text(14, c014,30,null,'style="background-color:#FBEC5D;" onClick="onFocusAreaFished('||seq_id||');"','f14_'||seq_id,''),'N','N/A') Area_Fished,
    decode(c017,'Y',apex_item.text(18, c018,4,null,'style="background-color:#FBEC5D; "onBlur="setUnitQuantity('||seq_id||')"','f18_'||seq_id,''),'N','N/A') UNIT_QUANTITY,
    decode(c017,'Y',apex_item.text(19,'CN',3,null,'readOnly=readOnly;','f19_'||seq_id,''),'N','N/A') UNIT_COUNT,
    c024 hms_flag,
    decode(c050,'Y',apex_item.checkbox(21,'Y','id="f21_'||seq_id||'" style="background-color:#FBEC5D; " onClick="alterYes('||seq_id||');" onKeyPress="alterYes('||seq_id||');"',c021),'N','N/A') FinsAttached,
    decode(c050,'Y',apex_item.checkbox(22,'N','id="f22_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterNo('||seq_id||');" onKeyPress="alterNo('||seq_id||');"',c022),'N','N/A') FinsNotAttached,
    decode(c050,'Y',apex_item.checkbox(23,'U','id="f23_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterUnk('||seq_id||');" onKeyPress="alterUnk('||seq_id||');"',c023),'N','N/A') FinsUnknown,
    decode(c050,'Y',apex_item.textarea(28,c028,3,null,null,'f28_'||seq_id,''),'N','N/A') Explanation,
    decode(c024,'N',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'U',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'Y','N/A') Nature_Of_Sale,
    decode(c020,'Y',
    apex_item.select_list_from_LOV(40,c040,'HMS_AREA_CODE','style="background-color:#FBEC5D;"',null,null,null,'f40_'||seq_id,''),
    'N','N/A') HMS_AREA_CODE,
    c020,c050,
    decode(c020,'Y',
    apex_item.text(41,TO_NUMBER(c041),5,null,null,'f41_'||seq_id,''),
    'N','N/A') Sale_Price
    from apex_collections
     where collection_name = 'SPECIES_COLLECTION' order by seq_id
    
    
    
    
    
    

    I noticed the following:

    When I change the column C011 (price) the following values are defined in dynamic action:

    P110_ID = f11_1

    P110_VALUE is everything that I change the price.

    When I change the column C024 (hms_flag), the following values are defined:

    P110_ID = f03_0001

    P110_VALUE = change everything what I hms_flag to.

    the region is updated in my dynamic action, and change of hms_flag does not take.  I tested the SQL query that generates the value of v_SEQ in the dynamic action.   Both a change of price and HMS_FLAG, it seems valid

    Select ltrim (substr(:p110_ID,5,4),'0 ') in the double v_seq;

    If f11_1, v_seq: = 1

    If f03_0001, v_seq: = 1

    Thank you!

    solved.  sort of.

    domain c024 references f03.

    dynamic ACtion, step 4 calculated v_member as a substring of P110_ID... and in all other areas, the column and the field (fxx) displayed the same value... otherwise c024.

    I'm not exactly sure how solve it, but see the problem.

  • Cannot perform the insert/update on the form of tables, due to the dynamic action

    Hi all

    I created a dynamic action that calculates multiple cells in a table.

    This feature works well, when I change the value of the associated cell then the computed value is changed by the dynamic action.

    But I am not able to insert or update the line in a table when the dynamic action is enabled. When I put the condition 'Never', then the line is inserted or updated without any problems.

    All guess where is the problem?

    Apex version: 4.1.1.00.23

    Jiri

    Nina wrote:

    I don't know why the 123,40 value (or other) is set to the next item in line (f09, fsc, etc.)
    >

    What is hidden and generated Apex elements are always included in the last cell (td) of the line. Thus, it has nothing to do with the next item, only the last cell.
    If you see the last cell of the 888 Page you will see probably the same type = "hidden" entries here also.

    Your problem is not related to the HTML fragment to the last cell in the row showing all those extra items, it's somewhere else.

    Oh, here comes the jQuery selector:

    var clickedRow = $(this.triggeringElement).closest('tr');
    
    $(clickedRow).children('td[headers="SAL"]').find("input").val(myCalculatedTotal);
    

    SAL, COMM, w/e. here you will find the TD with headers = "COMM" and all the input fields and the value of all the entries in total calculated. Your selection is not precise enough in this case.
    So, target the specific entry.
    With the code example:

    
    
    
    
    
    
    
    
    

    change the switch on

    $(clickedRow).children('td[headers="SAL"]').find('input[name="f08"]').val(myCalculatedTotal);
    
  • Update a chart with dynamic action

    Hi all:

    I have a page that has a form and a graphic, and I want when you change that a certain element will automatically update the chart. To do this use a dynamic action to run the following javascript code:
    apex_RefreshFlashChart (3, '34122504914708573 ',' en ');
    apex_SWFFormFix ('c34122504914708573');
    The first parameter is the page number, the second is the id of the card and the third is the language.

    Everything works as I need.

    The question is, how to get the id of the graph in a different way? To get it, I had to check the source of the page with Firebug

    concerning

    Gerardo

    can a dynamic chart refreshed? Capture of the substitution string "#CHART_NAME #" in the region of graphic source is the key.

  • How the dynamic Action to update several items based on a JavaScript Expression producing a table?

    Using APEX 4.2.

    I have the list of selection using a LOV which returns a display value and a value separated by a comma e.g. return 'reserved to items' and "66,88" or "Available items" and "90,23".

    I want that return values for example "66,88" to be assigned to two my form fields.

    I have a dynamic action that fires when the field with the changes of the list/select-LOV. I am using an action of 'Set value' and set 'Expression JavaScript' with the expression itself type value ' $v("P1_MY_SELECT_LIST").split(",") and using Type "Article (s)' selection and listing the two points that I want to set as the items in question (from the description of the JavaScript expression field it appears that a table of the results would be assigned to the changed items , in the order.

    However, the original value of the LOV return value is passed to the first of the elements concerned (complete with the comma if the original return value was of the form '10')

    If I add more REAL action of the JavaScript "alert (" HELLO "+ $v ("P1_MY_SELECT_LIST") .split (", ") [0] +" WORLD "+ $v("P1_MY_SELECT_LIST").split (", ") [1]" ") I * see two expected values.»

    Any ideas what I could do wrong?

    The action 'Set value' affects the value specified to all affected elements: a value to one or more items. To set a different value at different points, you need several actions "Set value", or simply use javascript to do it in one.

    Even if you use a javascript expression that corresponds to a table, the table is just being converted to a string again. It creates a mapping of some sort. That is why for example with '10', she also translated as such. Actually you set this value to these two elements: ' 10, ".split(",").toString () (implicit in the chain of course).

    The code makes it very obvious that it doesn't handle values, as described in the help of the element. Aid is not correct or is the implementation simply not here yet?

    Just look at the javascript for dynamic actions, images/libraries/apex/dynamic_actions.js, service da.setValue directory file:

        function _setValue( pValue ) {
            lAffectedElements$.each( function( i ) {
                // Set all affected elements to the value passed
                $s( this, pValue, null, lSuppressChangeEvent );
            });
            /* Resume execution of actions here and pass false to the callback, to indicate no
            error has occurred. */
            da.resume( lResumeCallback, false );
        }
    

    And when you use a javascript expression:

        } else if ( lSetType === "JAVASCRIPT_EXPRESSION" ) {
            _setValue( lJavaScriptExpression.call( this ));
    

    It's pretty simple. (and this is checked on apex 5. It's the same on 4.2)

  • Dynamic Action condition javascript checkbox.checked count > 0

    Hi all

    I'm stuck with a condition of the dynamic action. I have the following:

    $("#P302_COMPANY").val () .length > 0 & & ($("#P302_DEPARTMENT").val () .length > 0 | $("#P302_PRODUCT").val () .length > 0 | $("#__P302_INDUSTRY__").val () .length > 0)

    What would be nice if all items were areas of text, but P302_PRODUCT and P302_INDUSTRY are the lists box, and I want to check if 1 or more values in the list are checked... but I can not work how to do it... any ideas?


    Thank you

    TSD

    Hi Tod

    then three is still fair to say if the element has a checked value?

    Yes, but not straight forward.  You need a javascript routine that traverses the dom looking for items of type box to the appropriate div, and then, for each item in the loop, set a flag if the checkbox is set (assuming that you only 1 of the total updated check).

    Another way would be to create a hidden page element, say P302_PRODUCT_CHECKED, then put a dynamic action on the element of the page P302_PRODUCT with the onclick event and a condition that if the box return value is not null, then the real event will mark the beginning session state (PL/SQL Expression - apex_util.set_session_state) and the value for P302_PRODUCT_CHECKED to say 'Y '.  You would need a false event to set P302_PRODUCT_CHECKED to null if the checkbox is not set. You can then test #P302_PRODUCT_CHECKED == 'Y '.

    Concerning

    Paul

  • Tips: APEX 5 r IR by a dynamic action after the text fields complete

    Hello I hope I can get assistance on this matter and thank you in advance for any information.

    I have an APEX 5 screen, that has 4 fields of entry of text and under this one IR that has these 4 parameters in its SQL where clauses.

    Now if I create a button that submits page or redirects to this page my report can be updated with the values of user entered without problem, basic stuff.  If I create the settings section as a dialog box model once again that I can get the update report as this dialogue submits the page as well as the report can refresh according to closed dialog option.

    What I struggle to reach is to allow the user to enter values in the text fields click on a button called 'submit' and there all stages of implementing dynamic action without page reloading.  I want user to P1_A, P1_B, P1_C, P1_D press on "submit" input, dynamic action that links the values entered into the fields, then fire another dynamic action that updates the State when the button is clicked / modified values what works the best.

    I am struggling to get this to work and I even tried to copy these settings and do them as hidden for example bind input P1_A to P1_A_Hidden by a dynamic action and have the report where clause =: P1_A_HIDDEN, but have not managed to get this working.

    It's possible?  I know its easy to simply send the page and make it work, but I want the experience to be quite uniform for the user and act as you never leave the page.

    I saw on the packages of the app in the chart example.  The bubble chart has a list selector (salary) and the table updates dynamically, it seems so that the process can occur, but I need the user to enter text and not use selection lists.

    My apologies if I missed any, but I can give you more if it helps.

    Concerning

    1972903b-5166-494e-8355-08d9d4006e96 wrote:

    Hello I hope I can get assistance on this matter and thank you in advance for any information.

    I have an APEX 5 screen, that has 4 fields of entry of text and under this one IR that has these 4 parameters in its SQL where clauses.

    What I struggle to reach is to allow the user to enter values in the text fields click on a button called 'submit' and there all stages of implementing dynamic action without page reloading.  I want user to P1_A, P1_B, P1_C, P1_D press on "submit" input, dynamic action that links the values entered into the fields, then fire another dynamic action that updates the State when the button is clicked / modified values what works the best.

    The button simply trigger a unique dynamic action of refreshment on the IR region. Session state for page elements must be processed automatically by specifying them in the property Page to submit Items of the IR region.

    Please ensure that you have updated your forum profile with a recognizable username instead of "1972903b-5166-494e-8355-08d9d4006e96": Video tutorial how to change username available

  • Variable setting wrong with dynamic action for the region of report

    Hello

    I can't setting a variable. Here are the details of connection:

    Connection information:

    TCARMY workspace

    User Apex_dev

    Password dev_apex

    Application 88542

    Page 11

    If you run the page 11 and just click on submit, there will be two rows. If you click on one, the modal region won't say no data found. If you click on the button submit once again, the value is passed if you click on it now, the results arrive. If you click on the second row, it still shows the value of the first row. If you click on submit again after clicking on the second line, then it is displayed correctly. It seems that the value is set to submit it. I want this to work when clicked, and then for the sql to run with the value that is in this variable when clicks on the element. There is a bit of javascript page level and dynamic action. Something is not right to the installation.

    The modal window should popup and run the sql at that time with the variable data and view the two columns. And if the user clicks on the second row, it would display the data in the row.


    Thank you

    Tim

    TC-army wrote:

    If you run the page 11 and just click on submit, there will be two rows. If you click on one, the modal region won't say no data found. If you click on the button submit once again, the value is passed if you click on it now, the results arrive. If you click on the second row, it still shows the value of the first row. If you click on submit again after clicking on the second line, then it is displayed correctly. It seems that the value is set to submit it. I want this to work when clicked, and then for the sql to run with the value that is in this variable when clicks on the element. There is a bit of javascript page level and dynamic action. Something is not right to the installation.

    What has not been set up right, it's that the element of P11_NAICNUMD parameter was not specified in the source attribute of Page to go to the region, modal Discount. The current value in the browser page, therefore, was not defined in session state when the report has been updated by the dynamic action. When

  • value of the element is not common when used in dynamic action

    I'm learning the 5 apex and I wanted to create a page that would update the fields in a record by entering the unique id of the recording using a dynamic action with plsql.

    When I click on the button update the value of the element of the text uses the previous value and not the input current. The 'works' update, but the ID values are not appropriate.

    How can I make sure that when I click on the update button, the dynamic action will get the current value of the text element and not the previous (when the page was submitted)?

    I created a quick demo or what I was testing in apex.oracle.com and always gives me the same result.

    dacoellov wrote:

    I'm learning the 5 apex and I wanted to create a page that would update the fields in a record by entering the unique id of the recording using a dynamic action with plsql.

    When I click on the button update the value of the element of the text uses the previous value and not the input current. The 'works' update, but the ID values are not appropriate.

    How can I make sure that when I click on the update button, the dynamic action will get the current value of the text element and not the previous (when the page was submitted)?

    I created a quick demo or what I was testing in apex.oracle.com and always gives me the same result.

    What dynamic action event and what types of action are involved here? Provide details, or better yet share identification information of developer comments for the apex.oracle.com workspace so that we can see the demo.

    If the dynamic action executes an SQL statement or a PL/SQL process on the server that requires page updated element values in session state, specify these items as part of dynamic action Page to submit items .

Maybe you are looking for