dynamic action - hide values if the element in the array?  syntax error (I think).

Hello world

I have an application page that contains a lov (gears).  If a particular device is selected, I want to hide other fields.   The value of the machine could be one of many.  I created a dynamic action using javascript... but I'm really not familiar with javascript and can't seem to make it work.   Note, there is a line below commented that compared to gear to the value of "500".  This line works and mask fields... but I need to make it work for all possible values.  Any help would be really appreciated!

Thank you, Karen

var no_size is ["000", "300", "320", "400", '500', '501', '550', "620", "630", "650", '662', '700', '750', '760', "803", "811"];.

$(". {Gear") .each (Function (index)}

If ($v (this) == '500')
If ($.inArray ($v (this), $no_size)) >-1
{
var rowTR is $x_UpTill (Thi, 'TR');.
$(rowTR).find(".) G_SIZE"). Hide();
$(rowTR).find(".) Stretch"). Hide();
$(rowTR).find(".) Mesh"). Hide();
}

});

This seems to do the trick.

var no_size is ["000", "300", "320", "400", '500', '501', '550', "620", "630", "650", '662', '700', '750', '760', "803", "811"];.

$(". {Gear") .each (Function (index)}

If (no_size.indexOf ($v (this)) > - 1).
{
var rowTR is $x_UpTill (Thi, 'TR');.
$(rowTR).find(".) G_SIZE"). Hide();
$(rowTR).find(".) Stretch"). Hide();
$(rowTR).find(".) Mesh"). Hide();
}
on the other
{
var rowTR is $x_UpTill (Thi, 'TR');.
$(rowTR).find(".) G_SIZE"). Show();
$(rowTR).find(".) Stretch"). Show();
$(rowTR).find(".) Mesh"). Show();
}
});

Tags: Database

Similar Questions

  • APEX 4.0 IE8 - definition of value with dynamic Action - no display of the result

    Hello

    I use APEX 4.0 and IE8. I made a dynamic action that fires on the editing an item.

    Event: change

    Rype of selection items

    Article: P77_item_1

    Condition: No strings attached

    Real Actions: The value

    Action: Set

    Set type: PL/SQL function body

    : P77_item_2: = Y;

    Page items to submit P77_item_1

    Items affected

    Items of Type selection

    Elements P77_item_2

    I see that it works in session. Now, I see that P77_item_2 is inserted. But there is no display of the value.

    I tried item_2 as textfield, view only, or read-only, but the behavior is always the same. What can I do to show the change in the order of the day?

    Thank you!

    Le_di wrote:

    I use APEX 4.0 and IE8. I made a dynamic action that fires on the editing an item.

    Event: change

    Rype of selection items

    Article: P77_item_1

    Condition: No strings attached

    Real Actions: The value

    Action: Set

    Set type: PL/SQL function body

    : P77_item_2: = Y;

    Page items to submit P77_item_1

    Items affected

    Items of Type selection

    Elements P77_item_2

    I see that it works in session. Now, I see that P77_item_2 is inserted. But there is no display of the value.

    I tried item_2 as textfield, view only, or read-only, but the behavior is always the same. What can I do to show the change in the order of the day?

    Do not have access to an instance of APEX 4.0 to study, but any code of "PL/SQL function body" must include a RETURN clause:

    :p77_item_2 := 'Y';
    return :p77_item_2;
    
  • Is it possible to connect a simple 1 d array to a digital indicator or what would be the best way to display the numeric values of the array on the front panel?

    Is it possible to connect a simple 1 d array to a digital indicator or what would be the best way to display the numeric values of the array on the front panel? Examples or suggestions would be greatly appreciated.

    Thank you

    Tunis

    Thank you Adam, it's originally in a while loop, I placed it in a loop for example, wired County in the for loop and presto, this son of a digital indicator. It works very well. Thanks for the help folks.

  • Dynamic action: need to refresh the area when changing value radio button

    Hello

    I use Apex 4.2 worm.

    I need to apply a dynamic action with the refreshment area.

    I need to refresh the area when I change the value of the radio button.

    To do this, I created dynamic action on the changes and select the refresh option to update the region.

    But it does not.

    If you want to check, then see below for workspace:

    Workspace: APEX_ISSUE

    User name: [email protected]

    Password: kaushik1@34

    Please use Page no 5.

    Thank you

    Hi Maxence,

    CORINE wrote:

    Hi Kiran

    Thank you very much.

    It works very well.

    One more I need help, I need to scroll in the radio button because I'm showing type of booking successively from top to bottom.

    How can I set scrolling in the option box.

    Thank you

    What do you mean by scrolling in the option button?

    I applied a horizontal scrolling for the region containing radio buttons by using the suite in the attributes of the region:

    style="overflow-x:scroll;"
    

    If you apply the change just of vertical scrolling x to y.

    I hope this helps!

    Kind regards

    Kiran

  • Dynamically show/hide columns in the reports of the IR

    Env

    RDBMS: Oracle XE 11.2

    Request Express 4.2.4.00.08


    Hi all

    I am bulding an open source oracle apex app to track aircraft using ADS - B technology.

    I have somes types of units.  for example (kilometers, miles, knots, feet and metres).

    So, in the report of the IR, I want pick capable of showing a unit in time.

    For example

    Radio Group.

    Ground speed: (*) km/h () Mhp (Knt)

    Vertical speed: (*) ft/s (m/s)

    Can anyone help to build a code or point a direction to get above result?

    I tried already a thread, but did not work.

    Apex: Display/hide report column with Radio button. 2 cents to Oracle by Christoph

    Display / hide column IR dynamically


    I have a limited knowledge of Oracle APEX.


    Levi Pereira says:

    I am bulding an open source oracle apex app to track aircraft using ADS - B technology.

    I have somes types of units.  for example (kilometers, miles, knots, feet and metres).

    So, in the report of the IR, I want pick capable of showing a unit in time.

    For example

    Group of radio buttons.

    Ground speed: (*) km/h () Mhp (Knt)

    Vertical speed: (*) ft/s (m/s)

    There are different ways to do this. Probably the easiest would be:

    1. Create lists of values (LOVs) for units.
    2. Add the elements of the Group of radio -based unity LOVs report interactive region (IR), by specifying one of the units as a default value.
    3. Present the radio group via the Items property of the Page to send IR region.
    4. Create multi-column report for each metric combination / unit.
    5. Control the display of the report columns (applies to IR, but also classic report columns) conditionally using value of element in the Expression 1 = Expression 2 conditions Expression 1 is the group element of relevant radio and Expression 2 unit LOV value corresponding to that used in the column of the report.
    6. Add a dynamic action on the evolution of the components of the radio to refresh the IR region.

    A less obvious approach would also use LOVs, group radio elements and dynamic action of change/update as above, but only have one column for each measure in the report. The column value is calculated using an expression based on the value of the radio group, for example:

    .
    .
    .
    /* Assuming base speed unit is km/h */
      ground_speed
    * case :p1_ground_speed_unit
        when 'mph' then 0.621371
        when 'kn' then 0.539957
        else 1
      end ground_speed
    .
    .
    .
    

    The unit could be indicated in the column heading in the report referring to the element of the device by using a substitution of static text string:Ground Speed (&P1_GROUND_SPEED_UNIT.)

  • Dynamic action - SQL - not returning the result as expected

    Hello

    I have a dynamic Action that runs some SQL codes and must return a string to a text box...

    the sql code that the action runs when a button is reached is:

    Select REPLACE ("|: P292_QPRODUCTS |) '''', ':', ' ' || : P292_QAOPRODUCTS | ""ProductsID"(="') from DUAL "

    P292_QAOPRODUCTS = DATABASE: JAVA

    P292_QAOPRODUCTS = AND (user can also choose OR)

    In the command SQL is what I see:

    "DATABASE" AND "ProductsID" = "JAVA".

    In the text box apex that action must set the value of the use of SQL I see only:

    ''

    any ideas?

    see you soon

    t

    Hello

    Could you share the 'Settings' and 'Affected Elements' sections of the property page of DA?

    You can also try a PLSQL and Code PL/SQL type as:

    Start

    Select REPLACE ("|: P292_QPRODUCTS |) '''', ':', ' ' || : P292_QAOPRODUCTS | ""ProductsID"(="') "

    in: DOUBLE P292_TEXT_BOX;

    end;

    Don't forget to fill in the field "Page elements to return" with the name of P292_TEXT_BOX.

    Concerning

  • Oracle apex dynamic action set value action does not

    Hello

    I have two questions, that I am trying to solve. This is the scenario:

    (i) 4.0 on oracle 10 g oracle apex
    (II) created a form with the following page:
    -P526_SES_DET_ID
    -P526_VESSEL_ID (selection list)
    -P526_JOB_DATE (date picker)
    -P526_DAY_TYPE (list of selection with values DAY ORDINARY (if P526_JOB_DATE is a day from MONDAY to FRIDAY),)
    SATURDAY (if P526_JOB_DATE is SATURDAY) and SUNDAY/PUB. HOLIDAY (if JOB_DATE is SUNDAY)
    -P526_LABOUR_TYPE (selection list)
    -P526_SHIFT (selection list)
    -P526_NO_OF_LABOUR
    -P526_RATE
    -P526_SES_TOTAL

    (1) I created a dynamic action of the value set on the P526_JOB_DATE page element to set the value of P526_DAY_TYPE to one of the three values above depending on the day
    P526_JOB_DATE falls. Parameters are the following:

    -Action: Value set
    -Set type: SQL statement
    -SQL statement:
    Select case when (to_char (to_date(:P526_JOB_DATE,'DD-MM-YYYY'), 'DAY')
    like ' % MONDAY % ") then" DAY ORDINARY. "
    When (to_char (to_date(:P526_JOB_DATE,'DD-MM-YYYY'), 'DAY')
    like ' % TUESDAY % ") then" DAY ORDINARY. "
    When (to_char (to_date(:P526_JOB_DATE,'DD-MM-YYYY'), 'DAY')
    like ' % WEDNESDAY % ") then" DAY ORDINARY. "
    When (to_char (to_date(:P526_JOB_DATE,'DD-MM-YYYY'), 'DAY')
    like ' % THURSDAY % ") then" DAY ORDINARY. "
    When (to_char (to_date(:P526_JOB_DATE,'DD-MM-YYYY'), 'DAY')
    like ' % FRIDAY % ') then ' DAY ORDINARY. "
    When (to_char (to_date(:P526_JOB_DATE,'DD-MM-YYYY'), 'DAY')
    like ' % SATURDAY % ") then 'SATURDAY '.
    When (to_char (to_date(:P526_JOB_DATE,'DD-MM-YYYY'), 'DAY')
    like ' % SUNDAY % ") then ' SUNDAY/PUB. HOLIDAY"
    end DAY_TYPE
    of the double

    -Page article to submit:
    -Select the Type: Item (s)
    -Article (s): P526_DAY_TYPE

    The SQL statement sets the value of P526_DAY_TYPE that when I replace: P526_JOB_DATE with a date like January 11, 2010 format ' and a date is taken to
    Duration otherwise it doesn't.

    (2) want to be able to maintain the values of P526_VESSEL_ID, P526_JOB_DATE, P526_DAY_TYPE, P526_LABOUR_TYPE, P526_SHIFT after an insert action as default values for the next create another form operation.

    Like all the ideas on how to implement or to solve problems (1) and (2) would be very appreciated.

    If you want to use P526_JOB_DATE in your SQL statement add P526_JOB_DATE to the "referred to submit Page:" field.

  • Dynamic action - hide a button based on SQL

    Hello

    I have a button that I want to disable the SQL logic

    something like that

    dynamic action must check

    If P2_CUSTOMER_NAME in (select CUST_NAME FROM TABLE_A)

    If true, then hide from another BUTTON_1 does not hide BUTTON_1

    Please advice how


    Thanks in advance

    Just click the button to launch OBE. At the most, you may need to be a member of the RTO.

    André

  • dynamic actions - hide / show items

    Hello

    I'm looking on the application, say, 3 elements (Item_1, Item_2, Item_3), led by a group of radio buttons (with 2 entries option_A, Option_B)...

    If a radio option_A group is selected, I want to show 2 items (Item_1, Item_2) and when option_B is selected, and then I just want to show a single point (Item_3)...

    Please advice how to accomplish the above... a tutorial or a reference to the working example would be better...

    Thank you

    Hello

    Suppose that the radio button is P5_RADIO and 3 elements are
    P5_1, P5_2, and P5_5

    (1) create a dynamic Action. (Advanced)
    (2) enter the name of dynamic Action, and then click Next
    (3) event - select change
    Selection type - selection item (s)
    Product (s) - enter P5_RADIO
    Condition: no strings attached
    Click next
    (4) action - select Execute javascript code
    Uncheck the "fire on Page load.
    (5) in the Code, enter

    if ($v('P5_RADIO') == 'A'){
       $x_Show('P5_1');
       $x_Show('P5_2');
       $x_Hide('P5_3');
    }else {
    
       $x_Hide('P5_1');
       $x_Hide('P5_2');
       $x_Show('P5_3');
    
    }
    

    Click next

    Example: http://apex.oracle.com/pls/apex/f?p=27576:5

    Kind regards
    Shijesh

  • Prevent fireing "Submit BeforePage" - dynamic Action if I click the button CANCEL

    Hello
    I create a dynamic Action on the event "before submitting the Page" which shows me a "Please Wait" - window, if I submit a page. It works very well.

    But if I click the button CANCEL, dynamic Action runs as well. Because of that I put the status "request is NOT contained in the Expression 1" and 1 Expression I put BACK, because demand from the button CANCEL is BACK. Unfortunately it is running if I press the button CANCEL.

    The action is "executing JAVA-code" and the code is:
    $x_Show('AjaxLoading');  
    window.setTimeout('$s("AjaxLoading",$x("AjaxLoading").innerHTML)', 100);
    What's not here?

    Kind regards
    Mark

    Hi Mark,

    If you change your button 'CANCEL' to a "Redirect to the page of this application" button, the page is not submitted and does not fire the event "before submitting the Page.

    Or if you want to stick with the shipment, you can check for this.data in JavaScript code because that will contain the value of the application to send it. So, for example, you could use

    if (this.data != "ZURUECK") {
      $x_Show('AjaxLoading');
      window.setTimeout('$s("AjaxLoading",$x("AjaxLoading").innerHTML)', 100);
    }
    

    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

  • Dynamic action - Hide and show interactive report

    Hello

    in the apex community tip http://www.oracle.com/global/de/community/tipps/apex40-dynamicactions/index.html (only in German), there is an example to hide and show a report interactive by dynamic actions.

    The approach described in the article should be case for normal or interactive reports.
    But in my case it works for normal relations. I am not able to update or hide the interacitve dynamic equity report.

    Has anyone had similar experience?

    Greetings
    Michael

    Hello
    You are welcome.

    * It is considered good etiquette to the responses of reward with points (as "useful" - 5 pts - or 'correct' - 10pts). :)
    Thank you
    Logaa

  • Change the value of the array element without using the keyboard

    I have a control array on my front, say 1 d, 10 items.

    In addition, the front panel should be used with a touch screen, so I have a Subvi keyboard that should be called when I choose one of the elements of the array.  Therefore, no keyboard entry is allowed.

    My question is, how can I determine which element that the user hit/clicked?... .and how to change this value?

    -Mike

    Gents nevermind, found a way to emphasise that if this is the best way, but I got it.

    In my structure of the event, I have an event looking for the mouse event down in regards to the control array.  This event triggers my screen touch keyboard Subvi to fire, and the closure of the Subvi I pass its value to the ArrElem.Value property to assign the table a hit/clicked item.  Works.

    -Mike

  • dynamic action + plug in to the right click.

    Hi all

    I installed a plug-in in my application of http://apex.oracle.com/pls/apex/f?p=1983:17:0: . and also, I created a dynamic action. but my questions are

    now, my questions are,

    1. how this plugin works for interactive report via a dynamic action only na?

    2. If I want those right click menu options such as edit & discover - how to add?

    3. If suppose I click on this edit/point of view, it should go to the appropriate page/report. -where and how to add these actions?

    any help will be very useful for me

    Thanks in advance.

    you change function js like this:

    function myMenuAction2 (Menu, el, pos)

    {

    If (Menu is 'page2')
    {
    Window.Location"http://apex.oracle.com/pls/apex/f?p=&APP_ID.:2: & APP_SESSION. » ;
    }
    on the other
    {
    Window.Location "http://www.google.com";
    }

    }

  • Dynamic action - item value passed is null

    Hello

    I use 4 Apex and having a problem with a DA. I need to get a new registration, based on a category number.

    Here is the code:
    begin
    wwv_flow_api.create_page_da_event (
      p_id => 4693110888588071 + wwv_flow_api.g_id_offset
     ,p_flow_id => wwv_flow.g_flow_id
     ,p_page_id => 2
     ,p_name => 'Get Next Scheme Number'
     ,p_event_sequence => 5
     ,p_triggering_element_type => 'ITEM'
     ,p_triggering_element => 'P2_SCHEME_CAT_CODE'
     ,p_bind_type => 'live'
     ,p_bind_event_type => 'change'
      );
    
    wwv_flow_api.create_page_da_action (
      p_id => 4693422739588087 + wwv_flow_api.g_id_offset
     ,p_flow_id => wwv_flow.g_flow_id
     ,p_page_id => 2
     ,p_event_id => 4693110888588071 + wwv_flow_api.g_id_offset
     ,p_event_result => 'TRUE'
     ,p_action_sequence => 10
     ,p_execute_on_page_init => 'Y'
     ,p_action => 'NATIVE_SET_VALUE'
     ,p_affected_elements_type => 'ITEM'
     ,p_affected_elements => 'P2_SCHEME_NO'
     ,p_attribute_01 => 'FUNCTION_BODY'
     ,p_attribute_06 => 'return SR.GET_NEXT_SCHEME_NO (:P2_SCHEME_CAT_CODE);'
     ,p_attribute_08 => 'Y'
     ,p_attribute_09 => 'N'
     ,p_stop_execution_on_error => 'Y'
     ,p_wait_for_result => 'Y'
     );
    null;
    end;
    /
    The function call connects to the DB and here is the result indicating that a NULL value is passed:
    Timestamp        Package          Unit                     Typ Log Message
    ---------------- ---------------- ------------------------ --- ---------------------------------------------
    20.00.29.067     SR               GET_NEXT_SCHEME_NO       I   Begin - 1
    20.00.29.068     SR               GET_NEXT_SCHEME_NO       D   Get next scheme no for:
    20.00.29.068     SR               GET_NEXT_SCHEME_NO       E   NDF: Could not find a sequence for scheme prefix
    Just so you see that it works:
    sr:plj-Bld@XE> select sr.get_next_scheme_no('SchCatSub') from dual;
    
    SR.GET_NEXT_SCHEME_NO('SCHCATSUB')
    ----------------------------------
                                213501
    
    1 row selected.
    And the newspaper:
    Timestamp        Package          Unit                     Typ Log Message
    ---------------- ---------------- ------------------------ --- ---------------------------------------------
    20.22.09.532     SR               GET_NEXT_SCHEME_NO       I   Begin - 1
    20.22.09.534     SR               GET_NEXT_SCHEME_NO       D   Get next scheme no for: SchCatSub
    20.22.09.534     SR               GET_NEXT_SCHEME_NO       D   Returning: 213501
    20.22.09.535     SR               GET_NEXT_SCHEME_NO       I   End - 1
    Any ideas why Apex does not pass the value of the element to the function call?

    Thank you
    P

    You must set 'Page to present' to be 'P2_SCHEME_CAT_CODE '.

    This takes the value from the browser and affects it in session state, which makes available to your PL/SQL

    Kind regards
    Scott

    blog: [base url - oracle.com] base - oracle.com
    Twitter: [url twitter.com/swesley_perth]@swesley_perth

  • Dynamic Action set value

    Hello

    anyone explain why does not accept DA 'Set value' value & P_ITEM. the format when you use the static Type of the value assignment?

    Thank you.

    Hello
    Have you tried using $v ('P_ITEM') in place of the ampersand - dot notation?

    Kind regards

Maybe you are looking for