Dynamic action for 2 fields in a table

Greetings!

I have a requirement where I need to disable/enable a field in a tabular presentation for a specific record based on the value of another field in the tabular presentation for this record.

In a concern for discussion, in my particular case - if FISHCOUNT > 1, then the LENGTH must be disabled. If count < = 1, then the LENGTH must be enabled. It should disable it only records where FISHCOUNT > 1.

I would do it with dynamic action and I learned through this forum (thank you!) that I can use jQuery for the event (when) the section of the dynamic action.

So that the part would look like:

Event: change
Selection type: jQuery Selector
jQuery Selector: td [headers = "FISHCOUNT"] select
Condition: above
Value: 1

So far so good. But where I'm stuck is how to reference the LENGTH field of the tabular form in the actions of TRUE and FALSE, so that when the change in the event product (FISHCOUNT), the LENGTH is disabled if FISHCOUNT > 1, or LENGTH is enabled if FISHCOUNT < = 1.

SEO so the scope of the CASE of my tabular presentation in the actions of True and False, that's where I need help.

Thanks in advance!

I use APEX 4.1.1

John,

You can do this by creating another dynamic action with the event 'Front Page submit' ("framework events" section).
With real action that executes javascript, load the page uncontrolled.

$("input:visible:disabled").prop("disabled",false);

This will select all elements disabled entry visible on the page and remove the disabled property.

Tags: Database

Similar Questions

  • 2 dynamic action for an item

    I have two dynamic actions for an item from the selection list that is loaded from an element of Cascade LOV.

    Dynamic action 1:

    Name: d1
    Condition: Value = "EXPECTED".
    true action: see the 'Solution' element.
    action of false: hide a 'Solution '.

    Dynamic action 2:

    Name: d2
    Condition: Value = 'OFFERED '.
    true action: see the 'Solution' element.
    action of false: hide a 'Solution '.

    That's happened? If only works with the dynamic action of d1 or when I did some changing works with dynamic action of d2. I unchecked the field "load fire on the page" but it did not work. I think that there is perhaps some collide with them but I analyzed it, but I can't find. Thanks in advance.

    Another thinks I want to ask is how to order values in a select list... with this code above indicate me the values in the following order: closed, lift, open, waiting. But I want the values in the following order: open, pending, climbing, closed. How can I do?
     select distinct STATUS as display_value, STATUS as return_value 
      from HD_STATUS
     order by 1
    Best regards, Bernardo.

    Ah so. It's actually easier then.

    You'll have an installation DA your d1 is configured with the following differences:

    Name: d1
    Event: Change
    Selectio type: Item(s)
    Item: P10_SUBSTATUS
    Condition: Javascript expression
    Value: $v('P10_SUBSTATUS')==='PLANNED' || $v('P10_SUBSTATUS')==='OFFERED' 
    
    true action: Show "Solution" item,
    false action: Hide "Solution" item.
    
    Nothing in the Condition box that currently has the PL/SQL expression. (Make sure to select "None" as the condition type in the condition box)
    

    You need basically the GOLD option that is provided above as Javascript. ' | ' is the operator or if you are not familiar with JS. ' = ' means exactly equal to, and possibly "==", equal to so you could also put it this way.

    Should have thought first of this route.

    Published by: Bob37 on June 28, 2012 16:15

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

  • Dynamic action for validation of date with the notification message plugin

    Hi all

    Someone help me please with dynamic action for validation of date with the message notification plugin. I have a form with two elements of the date picker control and message notification plugin.

    The requirement first user selects the exam is finished and then selects the date. So, if the date is greater than the date of the examination is over + 2 years then doesn't trigger the message notification plugin. I tried to create that dynamic action on the date picker date that triggers the scheduled issue notification message but I want to make conditional, I mean displays the message only if date of the selected is greater than the date of the exam is finished more than 2 years.

    In terms simple, notification is displayed only if provided is superior to (date of the exam is completed + 2 years).

    I use oracle apex 4.0 version and oracle 10g r2 database. I tried to reproduce the same requirement in my personal workspace. Here are the details. Please take a look.

    Workspace: raghu_workspace

    username: orton607

    password: orton607

    APP # 72193

    PG # 1

    Any help is appreciated.

    Thanks in advance.

    Orton.

    You can get the value of the date of entry:

    $(ele) .datePicker ('getDate');

    So what to add functions such as:

    function validateNotification (d1, d2) {}

    Date1 var = $(d1) .datepicker ('getDate');

    date2 var = $(d2) .datepicker ('getDate');

    if(date1 && date2) {}

    return ((date2.getTime()-date1.getTime())/(1000*24*60*60))>(365*2);

    } else {}

    Returns false;

    }

    }

    The logic based on setting (I have two years from years of 365 days preceding)

    Then in the D.A. specify a JavaScript expression as:

    validateNotification ('P2_REVIEW_COMPLETED', this.triggeringElement.id)

    Refer to page 2 for example.

  • Dynamic action on the fields of forms in table form

    Hello guys.

    That I can see on the form fields in a table, I can't perform dynamic actions. What I want is to have an element of the selection list when in the change event, it changes the values for all the records in the report. For example if I have 40 records in this tabular form and I change the value of 'Open' to ' near the field called State, I want to see this change (status value of 'Open' close ') all rows in this tabular presentation. Is this sensible?

    Thank you very much, Bernardo.

    Hello Bernardo.

    There are several ways to accomplish what you want.

    -You can create a PL/SQL procedure to manage an update on all the rows according to the value of the value of your column. I wrote once a blog that can help you with that:

    http://vincentdeelen.blogspot.nl/2013/06/custom-multi-row-processing-using.html

    -You can create a dynamic action with javascript or jQuery to handle the change event.

    The first option is more secure because it is managed by the database, the second is more simple and example adjustable all the entire column for all rows displayed, without the need to refresh your tabular presentation, or your entire page. For course work, you should however have little validation at the end of the database. I also think that it is not possible to set the values of the rows that are not displayed, which would again require some PL/SQL for handling.

    If you need help setting up the dynamic action, please set up an example on apex.oracle.com.

    Kind regards

    Vincent

  • Dynamic action on change the question in table form

    Hi guys!

    I wanted to add dynamic action on the (tabular) changes to execute the PL/SQL that checks if the form in a table column has been changed and if yes go into text field walue Y or N. It does not work... and I don't know why. If I create a validation with this PL/SQL, it works. Can you help me?

    DA:

    On change - tabular

    PL/SQL;
    DECLARE
       nazwa     VARCHAR2(4000);
       counter   NUMBER := 0;
    BEGIN
       FOR i IN 1 .. apex_application.g_f08.COUNT
       LOOP
        SELECT NAZWISKO INTO nazwa FROM SPR_META.M_UZYTKOWNICY WHERE NAZWA_UZYTKOWNIKA = apex_application.g_f02(i);
        
          IF wwv_flow_item.md5(nazwa) <>  wwv_flow_item.md5(apex_application.g_f08(i)) THEN
            counter := counter + 1;
          END IF;
       END LOOP;
    
       IF counter > 0 THEN
       :P5_IS_TABULAR_FORM_CHANGED := 'Y';
       ELSE
        :P5_IS_TABULAR_FORM_CHANGED := 'N';
      END IF;
    
    END;
    Page to submit items: P5_IS_TABULAR_FORM_CHANGE

    What's wrong?

    With respect,

    PsmakR

    In my opinion, a way more simple identify as change is to have just a handler which fires if any editable in tabular form field is changed.
    No connection to the server, without ajax. Do these controls PLSQL when/before submitting the page.

    $('#REGION_STATIC_ID').find('input,select').change( function(){
       $s('P5_IS_TABULAR_FORM_CHANGED','Y');
    });
    

    REGION_STATIC_ID's static ID region

  • Best way to apply the Format mask for the fields in a Table of the ADF

    Hi all

    12.1.3 JDev

    I would like to introduce the price data, quantity etc. fields of the ADF Table of the user interface in a specific format.

    These formats need to be dynamic, because they change according to the locale selected and sometimes they differ in the same locale.

    I tried approach converter custom but not satisfied because it is called several times when it is used in a table of the ADF and when asked that told me that this is the behavior.

    Custom converter of an attribute in a table called several times

    So, please suggest a better way to apply the format mask (which has min & max fractions, grouping, rounding) to the fields in the Table of the ADF.

    Please let me know if you need more information.

    Thank you

    B S Bilodeau.

    The second question, which I've mentioned here is the converter is called several times for each click on the table.

    This isn't a problem, this is the expected behavior (and you can't avoid it).

    Dario

  • 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

  • Asterisk for the fields in a Table bean

    Hi all

    We put some fields in a table that is advanced and the required attribute is 'yes '. But still it is not the asterisk marks on the ground and therefore difficult for our users to distinguish a required field of those non-mandatory. For all other fields that are outside of a bean from the table, if the required attribute is set to yes, then the asterisk appears.

    Is this a limitation of the OPS? or any other justification behind it?

    In the hope of a quick and accurate response to it :-)

    Thank you
    Amit

    Hello Amit,

    For the column you want to make it mandatory, Create ColumnHeader--> sortableHeader on the particular column and set its property indicator required Yes, no, uiOnly or validatorOnly_ according to your requirement.

    Kind regards
    Swati

  • Apex 4: Feature missing dynamic action for the region of calendar

    Hello

    If I create calendar view region Type 'Partial Page Refresh' it do not support fully dynamic actions.

    For me, for example event "discount for after ' are not triggered



    Kind regards
    Jari

    Published by: jarola on October 20, 2010 15:53

    Hi Jari,

    that is not yet supported, but it will be something that we seek to add to the 4.1

    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 using the box in a table

    Hello

    I'm using version 5.0, apex

    I created a tabular form and a report at the same table on the same page, in tables when I check a record, the report must refresh and display data for the selected record. Need your valuable advice.

    Thank you

    Infantraj

    Hi Infantraj,

    Infantraj wrote:

    Hello

    I'm using version 5.0, apex

    I created a tabular form and a report at the same table on the same page, in tables when I check a record in the form of tables, the report must refresh and display data for the selected record. Need your valuable advice.

    Thank you

    Infantraj

    You mean you want to filter the report in accordance with the selected line in the form of tables.

    1 create a hidden point having a protected value as no. and put it in the where clause of your report query.

    2. in the box click set the value of this hidden element.

    3. refresh the report region (add a real action-> cooling-> region-> Select your area of report.)

    or better to create example on apex.oracle.com and share identification information.

    Kind regards

    Jitendra

  • trigger for update field in a table with the sum of the fields to another table

    My experience in creation of triggers and pl/sql in general can be described in terms of oracle with the null value. I practiced by creating arrays and applications on my personal server at home to help me with some of my work related tasks. Right now I am creating a trigger which will, after insert, update, delete on the update of the table assignment_time_track the area of the time_spent on the table of assignments with the sum of the time_spent on the assignment_time_track table fields. I hope that run on the sentence it is clear to the people other than me. I tried this script on my own using the tool of creation of trigger for Oracle Database Express Edition, but I get the following error:

    Create a trigger failed, for the following reason:
    ORA-06552: PL/SQL: ORA-06553 finished Compilation unit analysis: PLS-320: the declaration of the type of the expression is incomplete or incorrect

    Here is my attempt to create the trigger on my own.

    create or replace trigger "ASSIGNMENT_TIME_TRACK_T1".
    AFTER
    INSERT or update or delete on 'ASSIGNMENT_TIME_TRACK '.
    for each line
    Start
    update assignments
    Set time_spent = (select sum (time_spent)
    of assignment_time_track
    where assignment_time_track.name = assignments.name);

    end;
    /


    If what I posted is not clear or more detail is needed, let me know and I will respond with a full description of tables and my goals for each table. Thanks in advance for any help. I also gladly accepts links to tutorials or lessons that explain how to do this kind of thing.

    Published by: bobonthenet on March 9, 2009 14:01

    I think I understand what you mean :)

    Rather than use a trigger to keep the master table (assignments) in sync with the time spent on the details, it would be much easier to use a query to do this, maybe creating a view.

    Something along the lines of

    SQL> create table assignments
      2  (id number primary key
      3  ,name varchar2(10)
      4  );
    
    Table created.
    
    SQL>
    SQL> create table assignment_time_tbl
      2  (id number primary key
      3  ,assid number references assignments
      4  ,time_spent number
      5  );
    
    Table created.
    
    SQL>
    SQL> insert into assignments
      2  select rownum
      3       , 'a'
      4    from all_objects
      5   where rownum < 5
      6  /
    
    4 rows created.
    
    SQL>
    SQL> insert into assignment_time_tbl
      2  select rownum
      3       , rownum
      4       , rownum * 3
      5    from all_objects
      6   where rownum < 5
      7  /
    
    4 rows created.
    
    SQL>
    SQL> commit;
    
    Commit complete.
    
    SQL>
    SQL>
    SQL> select a.id
      2       , a.name
      3       , (select sum (time_spent)
      4            from assignment_time_tbl
      5           where assid = a.id
      6         )
      7    from assignments a
      8  /
    
            ID NAME       (SELECTSUM(TIME_SPENT)FROMASSIGNMENT_TIME_TBLWHEREASSID=A.ID)
    ---------- ---------- -------------------------------------------------------------
             1 a                                                                      3
             2 a                                                                      6
             3 a                                                                      9
             4 a                                                                     12
    
  • A default value for a field in a table form, didn't get saved with line

    Hi people,

    I have a simple form on a table. A column, CUST_ID, must be filled when I create a branch to this form. So I change the element, set the source to 'Element (Application or page item name)' and then add the name of the source element. It works fine, the correct CUST_ID is entered in the CUST_ID field as expected. But when I add data to other fields and apply the changes, all data is saved on the line, except the CUST_ID. Am I missing simething simple here?

    Thank you very much

    -Adam vonNieda

    It's a slow Tuesday :)

    Return to the database and do not forget to enter the name of the field to the source value and specify the source used only when current value is Null to avoid that it be replaced by DML research.

    By default, enter PL/SQL Expression as type and: Field_Name (you load with). or you can also enter static text such as type and use & Field_Name. format instead, I think. Include the. After Field_Name.

  • Dynamic action for "no filter selected" on IR

    APEX 4.2.2

    I have a simple simple IR requirement. In fact, the functionality of the IR is so good I don't even build any other search fields, users will simply enter their search criteria in the search box and hit go. I followed the discussion here report forcing interactive that returns 0 rows on the initial screen to force the IR to show no lines on initial display - works fine - just good. So now when a user comes to the page, they have a void IR with a search box. They enter the search criteria and get their results - perfect. When the user then deletes the search criteria, i.e. remove the red X that appears at the top of the page of the record international when you applied a filter or all unchecked applied filters then IR then of course returns all rows in the query region IR (potentially thousands of lines). Is there a way to hang the point at which the filter is "no filter not selected", so that I can fix the base query to add a 1 = 2 type condition to make sure that the IR return lines?

    HI Kron,

    Here's a possible solution.

    create or replace function get_ir_bind_count(p_application_id in NUMBER, p_page_id in NUMBER)
    return NUMBER
    AS
        l_report apex_ir.t_report;
        l_region_id apex_application_page_regions.region_id%type;
    BEGIN
    
        select region_id into l_region_id
        from apex_application_page_regions
        where application_id = p_application_id
        and page_id = p_page_id
        and source_type = 'Interactive Report';
    
        l_report := apex_ir.get_report(
            p_region_id => l_region_id
          , p_page_id => p_page_id
        );
    
        return l_report.binds.COUNT;
    END  get_ir_bind_count;
    

    Then in your application, add a condition such as:

    where get_ir_bind_count(:APP_ID, :APP_PAGE_ID) > 3
    

    I've got 3 here because my request has 2 used variable bind (APP_ID and APP_PAGE_ID) and the build in a (APXWS_MAX_ROW_CNT). But anyway, you can adjust it according to your needs :-)

  • onSelect dynamic Action for the region selector display

    Hi all

    Have a problem and need your help.

    I have a page with 6 regions, I show them based on the view of region selector.

    I need some how know what tab is selected, something like an event "onSelect".

    The user then click on the 3rd tab, I need to know and perform javascript code.

    Please help and thank you very much!

    Andrei

    Then click on the event is appropriate.  Your selection in the DA is the problem.

    I was able to do the following:

    Event: click on

    Selection type: jQuery Selector

    jQuery Selector: .apex-rds

    (don't forget the point).

    True "to execute JavaScript Code.

    alert($(this.triggeringElement).find("span").text());
    

    This DA will appear the name of the selected region is within span tags.   The triggeringElement is the anchor tag (a) start clicking. Your code can look at $(this.triggeringElement).find("span").text () and do an if statement to decide what to do on what region.

    Thank you

    -Jorge

Maybe you are looking for

  • Help Pages for a great thesis - it can he manage?

    I just bought a mac in February this year and downloaded MS office.  I had to continual problems with Word - error messages when I go to save as there is an error on startup disk can not save or there is a serious disk on the job file error and I hav

  • VISA viOpen strangeness and linking them to an Agilent N6700B Power Supply (GPIB and C/C++)

    I noticed a strange behavior with connection to a power supply Agilent by GPIB, but if all goes well, just something miss me. If I power on and connected via GPIB to a card PCI of National Instruments and launch my app, viOpen gives me VI_SUCCESS and

  • How can I fix it? Your message cannot be delivered to the following recipients:

    Your message cannot be delivered to the following recipients: Delivery address: * address email is removed from the privacy *Reason: The remote SMTP server has rejected addressDiagnostic code: smtp; 550 requested action not taken: the mailbox not ava

  • Eve gray option. How to activate it?

    Original title: cannot use stand-by button I am runing XP Pro SP3 on the laptop Toshiba Satellite A7-S2061 QA.  On "Turn off computer", the stand button is barely visible (dimmed) and cannot be selected.  It's that way when I got, without battery and

  • Dell Latitude E5470 network driver to perform a PXE boot

    Hello hope someone can help out me. I'm looking for the right driver to inject more DISM to my Windows 10 Boot Image on my WDS server. I have added the original drivers from the file CAB E5470, Intel and more, but without success. So, I add the PXE s