dynamic action turns an article based on the result, and checks the database!

I use Apex 4.1

I do not know how to accomplish the following:
If a pick list is changed, a function is checked and based on the results of a another field is disabled or enabled.

I created a dynamic action (change) that executes a PL/SQL code, now I need to disable the other element.

the problem is that I can't save the dynamic action because of the sign #.

example:
Start
HTP.p ("< script type =" text/javascript"> '");
HTP.p ('$('#P35_FT_00010_DOC_NO').attr ("readonly", "true")');
HTP.p ("< /script >");
end;

I tried document.getElementById, but an error occurs also when I try to save.

I think the wrong way?... Help, please

1. create a step forward (not the simple/standard one) dynamic action.
2. create initially unconditionally (the wizard will not let you take the PL/SQL expression as a condition but we will go back and change it later)
3 assume that TRUE from your PL/SQL will lead to disable the item, then choose 'Disable' and the item you want to disable.
4. Once created, go back in the DA and change the status of PL/SQL expression and put your PL/SQL in there (suppose you have a function returns boolean called MY_FUNC and TRUE to him means disable).
5 copy the DA in its entirety to a new DA will be FALSE to activate the element.
6. Once copied, go into the new DA and change the status of PL/SQL to NOT (my_func).
7 change the REAL action of the DA to activate the element.

So now you should have two similar DAs... one for when MY_FUNC is true and disables the element, a when "NOT (my_func)" is true and allows the element.

If you do not disable, you can run javascript instead to set readonly. It seems that this is kind of what you tried to do, but you seem to use a jQuery selector, I suppose that (I did not recognize your syntax to off the bat)?

Try to use the javascript API instead Apex:

if ($v('P35_EN_DIS_DOC') == 1 )
  $x('P35_FT_00010_DOC_NO').readOnly='true';
else
  $x('P35_FT_00010_DOC_NO').readOnly='';

Tags: Database

Similar Questions

  • Dynamic action - show/hide area based on LOV that returns the ID

    Hi people,

    This should be simple, so someone who works with dynamic actions.

    I have a LOV based on query below:
    select OBJECT_ID, KOD 
      from x_data x;
    
    retuns:
       ID          KOD
    ----------------------------
        492961 BMW
        492964 VOLVO
        492960 MERCEDES
        492963 VOLKSWAGEN
        492959 SKODA
    Agenda: P200_KOD is based on LOV that displays KOD and returns the ID.

    On my page, I have also 1 region called TEST_REGION.

    I want to put in place a testament of shich dynamic action SHOW/HIDE a TEST_REGION based on the value selected in the order of the day: P200_KOD (LOV). Region should be shown if displayed (KOD) selected ID value begins with '% V '.
    By other words, if following query returns any folder, then the SHOW, HIDE it on the other:
       select *
        from x_data x
      where x.kod like 'V%'
         and x.object_id = :P200_KOD;
    How can I define a condition of dynamic action fires, for article: P200_KOD?

    Thank you
    Tomas

    Hello

    One way:

    Create an advanced dynamic action.
    Name: Region to hide
    Event: change
    Selection type: item (s)
    Items (s): P200_KOD
    Condition: Expression of JavaScript
    Value:

    $(this.triggeringElement).children("option:selected").html().substring(0,1) !== "V"
    

    Action: hide
    Fire on the Page loading: true
    Hide all items on the page on the same line: No.
    Action of false: show
    Fire on the Page loading: true
    Display all items in the page on the same line: No.
    Selection type: region
    Region: TEST_REGION

    Kind regards
    Jari

    http://dbswh.webhop.NET/dbswh/f?p=blog:Home:0

  • How to dynamically change values lov to an article based on the button

    Hello

    How to dynamically change the value list of an article based on the button create and apply the changes

    I have the column type of transaction that lov with values as inward, BACK inward outward, outward in the form based on the table...

    in design mode

    I need list to the OUTSIDE inward, in the type of transaction oly column...

    in update mode

    I need the list of BACK inward, BACK outwards in the type of transaction oly column...

    Kind regards

    Pavan

    Maybe something like that for a dynamic LOV

    select label d, label r from
      select 'inward' label  , 'create' chk from dual union all
      select 'outward'       , 'create'     from dual union all
      select 'inward return' , 'update'     from dual union all
      select 'outward return', 'update'     from dual
    )
    where (:P1_ID is null     and chk = 'create')
    or    (:P1_ID is not null and chk = 'update')
    
  • 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.

  • Show / hide the dynamic Actions does not work in Windows 7 IE10 and APEX 4.2.1

    Hello

    I have a page in the APEX 4.2.1 reactive Blue theme, where show or hide page elements based on changes to other page elements and their values, in terms of JavaScript expression.

    It's that everything works well in Chrome 31.0.1650.63 m and 25.0.1, Firefox but not Internet Explorer 10. I thought it might be linked to this solution to the problem of Ajax IE10 | Code of Jason and tried their recommendation, but appears not to have contributed.

    Help please!

    Thank you

    Alex.

    I found the problem and it was my fault. One of my dynamic actions using JavaScript expression conditions was missing quotes in $v ("P1_ITEM1"), breaking the rest of the related JavaScript code. Chrome and Firefox did not care, but IE seems to be less tolerant of mistakes like that.

    Scott, thanks anyway. It is useful to know that I have that option as well.

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

  • How do I delete an article based on the value of another field


    I have a pdf form that I added to the text fields. My challenge is that of the financial section of the form, if the value of a specific field is empty or null, I blank block of signature financial review.  I've been trying to find a way to cover the area of signature with a white box or have a text box with signature block text appear or disappear depending on whether the value is zero or empty.

    If seen many answers on how to make the field itself disappear based on value, but I did find something that causes another field or shape appear or disappear depending on the value of another field.

    Please try the following script,

    var signid = true;

    If (this.getField("finan").value! = 0) signid = true;

    of another signid = false;

    If (SignID) this.getField("signaturefield").display = display.visible;

    else this.getField("signaturefield").display = display.hidden;

    Please let me know if it solves the problem.

  • Dynamic creation of a control based on the input

    Hello

    Is it possible to change a control on the front panel?

    If the entry is a string I want to show a string. If the input is an integer, I want to show a cursor for example.

    I have a plan to implement on the different tabs and display the tab which must be shown, but maybe there's a faster, easier way?

    Thanks for the help!

    Kim

    Hi Kim,

    Thanks for the additional info.

    The dll and its manual to define what can be output and that's why you need to refer to the manual.

    When you call a dll in LabVIEW, you must set the parameters of static output and so data cannot be of a type for example if set it as a table, it will always be a table. This look for the 'node of function call' in the range of functions-> connectivity-> libraries & Executeables.

  • Want to fill in all fields in an article based on the Yes or no answer to a question from beginning

    I have a form of multi-page, several section I've created. Some of the sections start with a Yes or no question, if the answer is no, then all fields can be filled by n/a, which has a value of zero. I use the drop-down list in the fields and assign values for the Yes, no, N/A responds.

    Is there a way to set the values for all the fields in a s/o section, if the answer to the original question is no?

    Thank you

    MDawn

    HI Margaret,.

    I did not know that the Yes / No questions asked was in a group of radio buttons.

    In this case, I would put the script in the click event and instead to use xfa.event.newText (which relates to the change event), you must use the "this.rawValue" to test against the reaction of the users.

    If the click event is as follows:

    Switch (this.rawValue)

    {

    case 'Yes': / / or whatever you have linked a Yes response to

    TextField1.RawValue = "";

    textfield2. RawValue = "";

    case "No":

    TextField1.RawValue = "n/a";

    textfield2. RawValue = "n/a";

    }

    You can place this script in the click event of the Group of radio buttons, which will cover the two option buttons in the group. Don't forget to have the form to automatically save changes to script (file > properties > by default).

    Yes, "textfield1" is an example of an object in the subform you want to assign by n/a. If the user answers no, then N/A will appear in the part of the value of the object.

    Hope that helps,

    Niall

  • execution of actions on a selection based on the object type

    Hello.

    I am trying to write an AppleScript that considers the current selection, then redefines the scaling of all lines of that selection to 100%, and then sets the absolute horizontal scale of the remaining elements of the selection to 100%.

    My attempts so far are:

    say application «Adobe InDesign CS3»

    put Original_Selection to selection

    put to each graphic line of Original_Selection Lines_Selection -this part is not working

    put transform reference point of window layout 1 to anchor Center

    Choose Lines_Selection

    redefine the scaling to the selection {1.0 , 1.0}

    Choose Original_Selection - but it must be ' Original_Selection less Lines_Selection ' somehow

    put horizontal scale absolute at 100

    end say

    None of this really works as I expect, but I can't find out the required syntaxes. Anyone know where I am going wrong?

    Thank you.

    Try this:

    say application «Adobe InDesign CS3»

    the value transform reference point of window layout 1 of anchorage Center

    redefine the scaling of (each point of selection which class is the line graph) to {1.0, 1.0}

    the horizontal scale absolute value of (each element of selection whose class is not graphic line) to 100

    end say

    --

    Shane Stanley [email protected]>

    AppleScript Pro, April 2010, Florida http://www.applescriptpro.com>

  • How to hide a link/article based on the condition

    Hi all

    I have three sections in my dashboard page; section two contains guest user has run before. The third section contains a link to run the report. I need hidden link, run the report that users fill out invites him and press the Go button. How can I achieve this?

    Well, here are a few tips to navigate in this forum...

    (1) If a person offers a suggestion, answer like "Yes, it worked" or "no, it didn't work," then explain how it did not work if possible (you have an error message?, unexpected results, etc.)

    (2) even if a solution maybe not exact, if you helped to give you a new insight or if someone has taken the time to develop a response that helps you understand your problem beter, you can and should provide "useful" points

    (3) if the answer solves your problem or validates what you thought, you can mark it as "correct" and recognize providers of solutions and advice. ("Thank you guys for your help," etc.)

    (4) finally close the message itself.

    This would encourage others to help you in the future when you ask your question. (It is possible to "Watch" a user and never answer their question once again, if the poster is rude or ungrateful.)

    My final advice is Kishore is among the largest AIDS in this forum, my recommendation would be not not to the flame of his comments (even slightly) because it is he who will decide whether he will help you again. Oh, and Kishore hosts this forum. With many others in this forum, there just provides solutions and tips, devoting his time and resources when he can. :)

    I hope this helps.

  • Quiz results and check the answers

    He is the ACE in the last frame of a 10 question quiz. With each answer previous images, it adds 1 to the score (var Score; which is multiplied by 10 to the end) if it is correct, otherwise it adds nothing, and she changes the value of AC (#Correct) from 0 to 1 (the # is relatively to the question). The part works.

    However, there was and additional idea to have a 2 frame clip, one with a green check mark and the other with a red x (for good or bad). If the value of the AC (#Correct) has been changed to 1, it would move the related proceeding (mcA #) on the "correct" framework However, it doesn't seem to work and they are all on the "incorrect" framework I'm missing something, but it's deceiving me. Does anyone have an idea? Thanks a bunch!

    Duh.

    Sometimes the answer is right under your nose. Who can be a pain if you're Pinocchio.

    The response has been to HQ (#Correct) BEFORE the last image (the one first preference).

  • 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

  • The dynamic action of javascript

    Hello

    Good evening.

    I am aware, that we can trigger dynamic actions in multiple ways, based on events of the DOM.

    can someone help me triggering a dynamic javascript action.

    But not based on events.

    Ex: name action dynamic, based on its name or sequence or in any other way.

    There are situations where I have to call dynamic measures to avoid hand-written Ajax calls.

    Thanks in advance

    Hello

    The correct answer to this post:

    Not sure why the following code lines failed to trigger a dynamic action

    $("#P0_SIGNAL").val (123) .changes (); --Also failed
    $("#P0_SIGNAL").trigger ("change");  --Also failed

    This line would trigger a dynamic javascript action.
    Apex. Event.Trigger ($("#P3_TEST_ID"), "change","" ");


    Steps to make it work.


    I need to trigger a dynamic action when a value is set to hidden JavaScript element


    P3_TEST_ID is a hidden item.

    Create a dynamic action to shoot the P3_TEST_ID change event.

    Setting the value of p3_test_id of javascript wouldn't trigger a dynamic action.

    Run the following code to fire the javascript DA

    Apex. Event.Trigger ($("#P3_TEST_ID"), "change","" ");

  • Refresh the region in a table using dynamic action

    Hello

    I'm stumped on this scenario please advise. I have a dynamic action a button that when clicked fires real action pl/sql that will add a member to a collection, it works as expected, but the second real action on the same button will refresh the tabular form/report region. This isn't refreshing my form/report.

    To know that if we can indeed I created a report on the same page, based on the same point of view and dynamic action works.

    So why the dynamic action of refreshing working on my new report and not on the form of tables. I found a tabular presentation just a report of updateble.

    I use apex 4.1.0.00.32

    Help, please.

    Right-click of the tabular form > click attributes report > go to layout and pagination > set yes partial page refresh

Maybe you are looking for

  • iPhone 6s will turn off 30% of battery

    iPhone iOS 9.3.4/5 6 s (problem on both). A few weeks ago, my phone has started cutting about 30-40% battery life. Then the charge screen shows if I immediately try to restart. If I wait 15 minutes and start it says there are still about 30% remainin

  • Why is the worksheet grid is distorted

    I built a spreadsheet catalog for months. Today the right-hand side is distorted: repeated and overlap. (see extracts attached). The spreadsheet will export to Excel and re - import numbers, but in the process, I lose some formatting, and (for reason

  • How can I increase the number of tags shown down to the bottom of the list?

    When I go to bookmarks/Tags, there are only 10 tags displayed. I have created at least 15 tags. Is it possible to increase the number of Tags displayed in the drop-down list? Thank you

  • The HT820 ear and lower volume stuck button

    I had these headphones for almost 2 years works very well. I don't have a bluetooth phone, but I use my HT820 with my HP Ipaq 211 listening to music or watching movies. I also connected them to my work and the home pc. At work I connected them to the

  • Y700 upgrade RAM 32 GB

    Hello Recently, I bought Y700 isk with 16 GB of RAM. I checked the shop Lenovo site and I found this Module: Lenovo 16 GB DDR4 2133 Mhz SoDIMM Memory P/N; 4X70J67436 I want to ask can I change my current RAM modules by this new and upgrade the capaci