activation / deactivation of field with dynamic action and apply the attribute 'required value.

Hello

Wanted to know how to force the 'required' attribute for the element off after that is "activated" by a dynamic action.

For example, consider employee form.  I would like to disable the column of employment and salary.  As soon as the user enters the name of the employee, I will 'activate' JOB and SAL columns using "dynamic action".

IMG-1.png

IMG-2.png

And above works fine.  Please note that both JOBS & SAL of columns 'NULL' according to the DB table.  My question is, how to comply with the condition of 'value' Yes, after allowing them.

Another example would be, when the user selects 'Check' or 'Project', the 'no project' column will be activated.  Otherwise, "Project No." column is disabled (that is, the value is not required).  However, when turned on, I want to apply "value required" in this column.   How to get there?   (I use APEX 4.2.6)

Thank you

-Anand

Why you do not create a function that returns a Boolean, validation of the page?

You can do something like

BEGIN

IF: P5_ENAME IS NOT NULL THEN

IF: P5_JOB IS NULL THEN

Returns false;

ON THE OTHER

Returns true;

END IF;

END IF;

END;

You can change it to any desired column.

Tags: Database

Similar Questions

  • Help with dynamic action and the selection list item

    G ' Day Apex gurus.

    I have problems trying to achieve to trigger the Help window from an element automatically select. A Help window is triggered when it is clicked on the label of an item, but my customer wants to be triguered automatically as soon as the user clicks to view the options in the select list.

    I think I should be able to do with dynamic actions but I can't function.

    I know when someone clicks on the label of the item selection list trigger this JavaScript

    JavaScript:popupFieldHelp('277938589795252851','1545903379570909')

    So I want to trigger the javascript also when the user click on the item selection list and pull down the options and for that I think that the dynamic action is the way to go, but I can't do things.

    That's what I have to do:

    I created a dynamic option as follows:

    Name: test
    Sequence: 30
    Even: click
    Selection type: product (s)
    Article (s): P1_RATING <-a selection list item
    Condtion: - no requirement.

    Real Actions
    Sequence: 10
    Action: Run the JavaScript Code
    Fires when the result of the event is: true
    Fire on loading the page: checked
    Code: javascript:popupFieldHelp('277938589795252851','1545903379570909')

    Thank you anyone who can tell me what I'm doing wrong here or bring a solution to my problem to trigger the Help window from an element automatically select.

    Kind regards
    Carlos

    Hi Carlos,

    I've set up a test case of exactly in the same way and it worked fine for me. I've created a page element called P1_DA_DEMO and added some values of the static selection list, then added a help text. I used the settings are lower, I suggest you try again, but also make sure that you have no other Javascript errors on the page. Use a tool like firebug to check.

    Name: Action Dynamics demo
    Sequence: 10
    Even: click
    Selection type: product (s)
    Product (s): P1_DA_DEMO<- a="" selection="" list="">
    Condtion: - no requirement.

    Real Actions
    Sequence: 10
    Action: Run the JavaScript Code
    Fires when the result of the event is: true
    Fire on loading the page: unchecked
    Code: javascript:popupFieldHelp('277938589795252851','1545903379570909')

    Scope of the event set a Bind s.

    Thank you

    Paul

  • Javascript-based dynamic action and display the value of (!) from the selection list

    Hello

    I'm not a jQuery guru (yet).
    Can someone show me how to turn on or off an ITEM on a form based on the value display of a selection list (usually I have dynamic lists, so I don't 'know' even internal values)

    I created a simple demo in which you can (if you want to) show me how it works.

    Workspace: 6POOLRULES
    User: demo01
    Password: demo
    Application: 30851 (Drone)

    The idea is to
    * Disable/hide the "Id other Description" If the ' Id Type (display value!) is 'Passport' or 'license '.
    * activate/display the Description of the 'other' Id if the ' Id Type (display value!) is "other".


    I think that it should be dynamic action based on javascript/jQuery. But what would this jQuery selector should look like?

    Published by: bveoracle on March 29, 2012 07:28

    Published by: bveoracle on March 29, 2012 07:30

    Hello

    OK, I changed the dynamic action to use Jquery and get text from the value. The only thing I changed is in the section WHEN.

    Enjoy.

  • Dynamic action to set the value to select the text box list

    Hello

    I want the value in the list box select text box i.e list selection with 5 static values and on the user's selection, this value must be added in a box.

    I am using dynamic measurements. I tried with dynamic action and created the change list box select evnent but now how to set the value of the selection list to
    text box that I don't know.

    Help, please.

    Thanks in advance

    Hello

    I changed the dynamic on this page action to make it work now. I changed the "value Type" action 'Set value' 'Expression JavaScript' and "JavaScript Expression" do the following:

    $v(this.triggeringElement)
    

    This example gets the value of the page element 'DESPROGES', bypassing the server for nothing, as you did before.

    I hope this helps. Let us know if you have any other questions.

    Kind regards
    Anthony

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

  • Can a dynamic action of type 'alert' display a value of field without javascript?

    Hello

    can a dynamic action of type 'alert' display a value of field without javascript ( alert ( $x (P '200_OP').value)); ?

    What should I write in the 'text' section to display in the alert, the value of P200_OP for example?

    Gianpaolo cordially

    Hi gianpagi,

    gianpagi wrote:

    I know that with "run JavaScript Code" works. My question is about action as 'alert '.

    Dynamic action "Alert" is expected to this only the string to display in the alert. May not be able to access the current value set in a page element.

    Therefore, "Run the Code JavaScript" only works in this case where your can integrate the current values of the DOM html elements

    If you notice that da 'Alert' request 'Text' and 'Execute JavaScript Code' DA 'Code' request to be executed.

    Kind regards

    Kiran

  • Associated with dynamic action JavaScript error

    All,
    I'm on 4.2.1 Apex and have encountered an error with the Javascript action that performs a simple calculation of a ratio of two fields. I applied exactly same methodology to 3 other fields that have the same calculation of ratio and they work fine. The fourth field I get the result "NaN", from what I understand, not mean 'a number' in JavaScript. All fields related to the table columns defined as number.

    This one works-
    $x('P3_STUDENT_INFO_PERC_MIN').value =.
    $x('P3_STUDENT_INFO_MIN).value / $x('P3_STUDENT_INFO_TOTAL').value;

    And as I said, 2 other calculations, exactly like this work a fine - field is filled in with the division calculated. But the fourth is not:

    $x('P3_FACULTY_INFO_PERC_MIN').value =.
    $x('P3_FACULTY_INFO_MIN').value / $x ('P3_FACULTY_INFO_TOTAL') .value;

    I checked the field types, and they are entirely digital. All are null to start but as I fill in the fields in the numerator and the denominator, the dynamic action works very well for 3 of them, but not for the 4th. Even when I fill out the values, NaN remains in the calculated field. Maybe there's a limit to how many dynamic actions?

    ALSO - the action parameters are identical for all. Fire on loading the page, the event is 'Change', element type, the condition is that the value of the target report item is null.

    Help!

    Pat

    Published by: patfmnd on February 14, 2013 13:57

    Pat

    Have you checked what are the actual values of P3_STUDENT_INFO_MIN and P3_STUDENT_INFO_TOTAL.
    Use your browser development tools to debug. Or put in some alert messages.

    It could be as simple as a space after the name of the element.

    Also, personally, I prefer to work with $v ('P3_STUDENT_INFO_MIN') to get the value of the P3_STUDENT_INFO_MIN point.
    $x('P3_FACULTY_INFO_MIN').value only works for items that have the value such as elements of entry attribute. But it does not for example a select element.
    $v al covers the types of different elements and also returns a value when the element does not have a value attribute.

    $s ('P3_FACULTY_INFO_MIN', value_variable) is the Set accessor function.

    If you still can't run the installer a manifestation of the problem on apex.oracle.com so we can have the eye.

    Nicolette

  • dynamic action and LOVs

    Hello

    I'm having some trouble with the values defined in LOVs areas. I created a free workspace in Oracle APEX.

    I created a form with two fields of LOVs, EMP and DEPT, after that I created a dynamic action to set the value on the LOV Dept field. Then always when a new EMP is selected, the LOV Dept field must define the departament of the chosen MAP.

    Dynamic action has not worked with LOVs fields, always when I changed the field EMP LOV LOV DEPT field is canceled, but when I changed the DEPT LOV to SELECT LIST field, it's good work.

    dynamic action properties:

    event: change; *
    Select type: points; *
    point: EMP_LOV*.
    Condition: no condition; *
    Action: value; +
    setType: Sql statement+.
    Sql statement:+.

    Select DEPTNO+.
    from EMP+.
    where EMP. EMPNO =: EMP_LOV+.

    Assigned items: DEPT_LOV+.

    Brgds,
    André.

    Edited by: 969316 11/03/2012 07:36

    Edited by: 969316 11/03/2012 07:36

    Try sth like this:

    First create a hidden item, let's call it P1_DEPTHIDDEN then

    Create dynamic action:

        Event: Change
        Selection Type: Item
        Item: P1_EMPLOYEE
    

    Now for the first real action follow these steps:

        Action: Execute PL/SQL Code
    
        BEGIN
    
            SELECT DEPTNO INTO :P1_DEPARTMENT FROM EMP WHERE EMPNO = :P1_EMPLOYEE;
    
        END;
    
        Page Items to Submit: P1_EMPLOYEE
        Page Items to Return: P1_DEPARTMENT_HIDDEN -- This is return value, the value you will store in your database table (not the one you see on the screen)
    

    Now for the second True action follow these steps:

        Action: Execute PL/SQL Code
    
        BEGIN
    
            SELECT DNAME INTO :P1_DEPTHIDDEN FROM DEPT, EMP WHERE DEPT.DEPTNO = EMP.DEPTNO AND EMPNO = :P1_EMPLOYEE;
    
        END;
    
        Page Items to Submit: P1_EMPLOYEE
        Page Items to Return: P1_DEPTHIDDEN -- This is display value, the value you actually need to see in P1_DEPARTMENT item !
    

    Now for the third True action follow these steps:

        Action: Execute JavaScript Code
    
        $x('P1_DEPARTMENT').value = $x('P1_DEPTHIDDEN').value /* Now you set P1_DEPARTMENT value to be exactly what you need */
    

    I really hope that it works, it's probably more easy solution then this one.

    Mimi

  • using s condition for the execution of a java script with dynamic action

    I use the universal theme of apex 5 I have a form and I needed his label to be changed dynamically

    I used the following code to change the name of the field.

    $('label[for="P458_COMPANY"]').html('INSTITUTE/SCHOOL/COLLEGE');

    I used the loading of the page as dynamic action.

    the two mvisible and mid are oracle functions. .mvisible returns a Boolean result.

    And I need JavaScript to be triggered when the following function returns true...

    If mvisible (mid ()) = true then

    $('label[for="P458_COMPANY"]').html('INSTITUTE/SCHOOL/COLLEGE');

    end if;

    How can I get this done... In page load status?

    Or should I change the java script code.

    All information must be assessed

    Tell you that mvisible (mid ()) is a javasript function?

    Where it is then please try this:

    The status of PL/SQL can be deleted.

    The event is not what is important in this regard.

    Kind regards

    Tobias

  • Set values in a table with dynamic Action?

    Hi, I need help for my Application first, Apex, please. This page is for users of fuel truck who buy several gallons of fuel and use this page to distribute this fuel among the many projects. These users are familiar with filling in the Date of the Transaction, the Site, the Type of fuel from the fuel tank #, etc. on the top of the page and then using the lines below to split the fuel in different projects.

    Example: The user gets 100 gallons delivered, fills the Page elements on top with the details of the purchase and uses then 3 rows of tabular form to distribute among 3 project (Project1 gets 20 gallons, Project2 gets 30 gallons, Project3 gets 50 gallons). Each line in the form of tables inserts a new record in the table of database of fuel with different values for the Gallons and ProjectID, but the same Site, Date, Type of fuel and tank values.

    So there are columns hidden on the tabular presentation for Site, Date, Type of fuel and tank. They need get these values from the top so that the user doesn't have to type repeatedly. This is my problem: How can these hidden columns to get the values in the top text boxes dynamically? It must be dynamic, or changed immediately if the user changes anything in the decoders (as a typo).

    Just going to each as a column and defining the 'attributes of tabular form' by default for an item and then by setting the default value in the name of the element page text box will only work if somehow, the user submits the page and does not make typing errors before you fill out the form in a table. I need to be adjusted immediately. Also, is it something special to set the date picker on the form as a table for the value of the Date on the top picker? For the moment, I am trying to use the Set button to set the values in the boxes at the top of the page with their items and refresh the page, so the default values of the column in a table can be right. Is there a better way to do it? It does not work for the date picker.

    I just started to use Apex, I only know the basics of dynamic Action HMI. If I should use a jQuery or code in the HTML header or a 'Collection' Apex, be very specific. Page elements above have names like P13_TANK and the P13_TRANSACTION_DATE of Date Picker and the shape of the table has column names like TANK and TRANSACTION_DATE. Truckers and I appreciate any help, thanks!

    apex question.png

    ~ Saphira

    I forgot a few quotes:

    $("input[name='f05']").val(this.triggeringElement.value);
    
  • Performance issues with dynamic action (PL/SQL)

    Hello!


    I have problems of perfomance with dynamic action that is triggered on click of a button.

    I have 5 drop-down lists to select the columns that users want filter, 5 drop-down lists to select an operation and 5 boxes of input values.

    After that, it has a filter button that submits just the page based on the selected filters.

    This part works fine, the data are filtered almost instantly.

    After that, I have 3 selectors 3 boxes where users put the values they wish to update the filtered rows and column

    There is a update button that calls the dynamic action (a procedure which is written below).

    It should be in a straight line, the issue of performance might be the decoding section, because I need to cover the case when the user wants to set a null (@), and when it won't update the 3 columns, but less (he leaves ").

    That's why P99_X_UC1 | ' = decode(' ||) P99_X_UV1 |', "«,» | P99_X_UC1 ||',''@'',null,'|| P99_X_UV1 |')

    However, when I click finally on the button update, my browser freezes and nothing happens on the table.

    Can anyone help me solve this problem and improve the speed of the update?

    Kind regards

    Ivan

    PS The procedure code is below:

    create or replace

    DWP PROCEDURE. PROC_UPD

    (P99_X_UC1 in VARCHAR2,

    P99_X_UV1 in VARCHAR2,

    P99_X_UC2 in VARCHAR2,

    P99_X_UV2 in VARCHAR2,

    P99_X_UC3 in VARCHAR2,

    P99_X_UV3 in VARCHAR2,

    P99_X_COL in VARCHAR2,

    P99_X_O in VARCHAR2,

    P99_X_V in VARCHAR2,

    P99_X_COL2 in VARCHAR2,

    P99_X_O2 in VARCHAR2,

    P99_X_V2 in VARCHAR2,

    P99_X_COL3 in VARCHAR2,

    P99_X_O3 in VARCHAR2,

    P99_X_V3 in VARCHAR2,

    P99_X_COL4 in VARCHAR2,

    P99_X_O4 in VARCHAR2,

    P99_X_V4 in VARCHAR2,

    P99_X_COL5 in VARCHAR2,

    P99_X_O5 in VARCHAR2,

    P99_X_V5 in VARCHAR2,

    P99_X_CD in VARCHAR2,

    P99_X_VD in VARCHAR2

    ) IS

    l_sql_stmt varchar2 (32600);

    nom_table_p varchar2 (30): = ' DWP. IZV_SLOG_DET';

    BEGIN

    l_sql_stmt: = "update". nom_table_p | 'set '.

    || P99_X_UC1 | ' = decode(' ||) P99_X_UV1 |', "«,» | P99_X_UC1 ||',''@'',null,'|| P99_X_UV1 |'),'

    || P99_X_UC2 | ' = decode(' ||) P99_X_UV2 |', "«,» | P99_X_UC2 ||',''@'',null,'|| P99_X_UV2 |'),'

    || P99_X_UC3 | ' = decode(' ||) P99_X_UV3 |', "«,» | P99_X_UC3 ||',''@'',null,'|| P99_X_UV3 |') where ' |

    P99_X_COL | » '|| P99_X_O | » ' || P99_X_V | «and» |

    P99_X_COL2 | » '|| P99_X_O2 | » ' || P99_X_V2 | «and» |

    P99_X_COL3 | » '|| P99_X_O3 | » ' || P99_X_V3 | «and» |

    P99_X_COL4 | » '|| P99_X_O4 | » ' || P99_X_V4 | «and» |

    P99_X_COL5 | » '|| P99_X_O5 | » ' || P99_X_V5 | «and» |

    P99_X_CD |       ' = '         || P99_X_VD;

    -dbms_output.put_line (l_sql_stmt);

    EXECUTE IMMEDIATE l_sql_stmt;

    END;

    Hello Ivan,.

    I don't think that the decoding is relevant performance. Perhaps the update is suspended because another transaction has changes that are uncommitted to any of the affected rows or where clause is not quite selective and has a huge amount of documents to update.

    In addition - and I may be wrong, because I only have a portion of your app - the code here looks like you've got a guy here huge sql injection vulnerability. Perhaps you should consider re - write your logic in the static sql. If this is not possible, you must make sure that the entered user contains only allowed values, for example by P99_X_On white list (i.e. to ensure that they contain only values known as 'is', ')<', ...),="" and="" by="" using="" dbms_assert.enquote_name/enquote_literal="" on="" the="" other="" p99_x_nnn="">

    Kind regards

    Christian

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

  • VPN IPSEC ASA with counterpart with dynamic IP and certificates

    Hello!

    Someone please give me config the work of the ASA for ASA Site to Site IPSEC VPN with counterpart with dynamic IP and authentication certificates.

    He works with PSK authentication. But the connection landed at DefaultRAGroup instead of DefaultL2LGroup with certificate

    authentication.

    Should what special config I ask a DefaultRAGroup to activate the connection?

    Thank you!

    The ASA uses parts of the client cert DN to perform a tunnel-group  lookup to place the user in a group.  When "peer-id-validate req" is  defined the ASA also tries to compare the IKE ID (cert DN) with the  actual cert DN (also received in IKE negotiation), if the comparison  fails the connection fails. know you could set "peer-id-validate cert"  for the time being and the ASA will try to compare the values but allow  the connection if it cannot. 

    In general I would suggest using option "cert."

    With nocheck, we are simply not strict on IKE ID matchin the certificate, which is normally not a problem of security :-)

  • Need help with dynamic Action through 4 items

    Hello everyone.

    I'm having some trouble trying to comp with dynamic action that will turn on or display a select list item when a value is set for the four elements of the Radio button group.

    P1_SELCT_LIST

    P1_RADIO_GROUP_1

    P1_RADIO_GROUP_2

    P1_RADIO_GROUP_3

    P1_RADIO_GROUP_4

    So once all four Radio groups are not null, I want the select View list item.

    Any help with this would be great.

    I'm on Apex 4.2.0.00.27

    Hello

    You can create the following action:

    Event: click on

    Selection type: jQuery selector

    jQuery selector: radio

    condition:

    $v ('P1_RADIO_GROUP_1')! == ''

    &&

    $v ('P1_RADIO_GROUP_2')! == ''

    &&

    $v ('P1_RADIO_GROUP_3')! == ''

    &&

    $v ('P1_RADIO_GROUP_4')! == ''

    Then add a real Action as follows:

    ACtion: show

    Fires when the result of the event is: true

    Fire on the page loading: No. (uncheck)

    Assigned to elements, selection type: product (s)

    Product (s): P1_SELECT

    Also add an Action to false as follows:

    ACtion: hide

    Fires when the result of the event is: false

    Fire on the page loading: YES (check)

    Assigned to elements, selection type: product (s)

    Product (s): P1_SELECT

    Kind regards

    Vincent

    http://vincentdeelen.blogspot.com

  • Set the value hidden with dynamic action

    This is probably very simple, but I don't know exactly what I'm doing wrong.  I would like to use a dynamic action to set the value of an item hidden in the value of a selection list when that select list of changes.  So what I have is:

    Event: change

    Selection type: point

    Article: P1_SELECT

    Action: Set

    Set type: PL/SQL Expression

    PL / SQL: P1_SELECT

    Items concerned:

    Selection type: point

    Point: P1_HIDDEN

    where P1_SELECT is my list selection and the P1_HIDDEN is my element hidden.

    It doesn't seem to work.  I don't know that I'm doing something very simple, bad.  This should be easy points for someone!

    Thank you!

    John

    It's actually a session typical State missunderstanding. When the selection list is changed, it does not change the value of session state, but only the value of the side (browser) client. If you set value action will set the status value for current session on the element hidden, which will probably be NULL (or any value it is on, you can see in the session tab in the developer bar).

    Instead of a type of expression plsql for your set value action, must change to a javascript expression:

    $v ("P1_SELECT")

    who will get the value of the element of page P1_SELECT currently on the page.

    PS: also, in your affected items your article is ": P1_HIDDEN"-is two points in front of deliberate? It shouldn't be there

    PS2: If you mean to send the page, then you can set the property to 'protect the value' of the hidden element to 'No', otherwise you will receive a checksum error!

Maybe you are looking for

  • IPhone stolen

    Hello. Yesterday, my iPhone 6 has been stolen. I was able to delete content in https://www.icloud.com/. Last night, my friend received a message from an unknown number saying "your iPhone 6 64 GB gold was located near Metro Hotel 5110 today at 19:44

  • HP Pavilion TX 2231 G6: Re-install Windows 8

    Hi, I have purchsed my G6 2231 Tx pavilion before 3 years! As we know, it came pre-installed with Windows 8. But recently I installed Ubuntu LTS 14.04 in my Pavilion G6 2231 TX for some projects and I want to reinstall my windows 8 in my phone how ca

  • Installed Vista Business... lost everything

    I recently bought the laptop HP dv4 - I then installed Windows Vista Business... and now I have nothing other than vista on the laptop... I can't even access internet... or options system restore... I don't think I want vista, I want to just programs

  • Lib Modbus OR LabVIEW 2014

    Someone sees that a problem with the NI Modbus Lib in Labview 2014 use is intended for the version of labVIEW 7.1 - 8, 6.  NEITHER directed me this way rather than the Module DCS since I use only Modbus communication and it's just a very small part o

  • problems with my windows media player. It doesn't let me see any dvd.

    When I choose to play with wmp. It says wmp cannot play the dvd. You must go to the control panel and adjust the windows display settings. lower screen resolution and color quality settings BUT when I do all this and try again, IT STILL does not work