Problem with dynamic change a page item value

Hi,
I'm trying to dynamically calculated the value of an item based on a simple formula that involves the multiplication of two elements from the same page.
To do this, create dynamic action as follows:
Event: Change
Selection Type: Item(s)
Item(s): P19_DURATION
Action: Set value
Fire on page load: TRUE
Set Type: SQL Statement
SQL Statement: SELECT :P19_DURATION * :P19_RATE FROM DUAL
Page items to submit: P19_DURATION
Selection Type: Item(s)
Item(s): P19_AMOUNT
When altering the P19_DURATION get no change in P19_AMOUNT
Since my knowledge of javascript is almost zero, I'm trying to do this with pl / sql or sql. Try the dynamic action with a function or a PL / SQL statement and nothing works.
Have to use javascript for this?
Searching the forum I think it's something simple, but I did not find an example similar to what I need.
Regards

Event: Change
Selection Type: Item(s)
Item(s): P19_DURATION
Action: Set value
Fire on page load: TRUE
Set Type: javascript
javascript Code:
amount = $v('P19_DURATION') *  $v('P19_RATE');
$s('P19_AMOUNT',amount);

Similar Messages

  • Dynamic alignment of report column and page item value

    Hi friends,
    I have an interactive report which contains the columns like
    <li>empno
    <li>Name
    In the above i have "empno" with a column alignment of left and a "Name" with a column alignment of left.
    Whether it is possible to override the data alignment that we set in the report according to the value of the application item like
    If my application item value is US, then i need the column alignment of both the column"empno" and "Name" to be left and if my application item value is AR, then i need the column alignment of both the column "empno" and "Name" to be right. Whether is it possible to achieve the dynamic alignment to the report data of both the columns "empno" and "Name" according to the application page item value.
    And also in the case of page item i have a page item with a name P1_NAME in which it has a Element Horizontal/Vertical alignment to left.
    I need that element alignment of the page item to behave dynamically according to the application page item, like if the application page item is US then the element alignment of the page item has to be left and if the application page item is AR then the element alignment of the page item has to be right.
    Whether is it possible to achieve my above two scenario's friends. Kindly help me with this.
    Thanks in advance.
    Brgds,
    Mini

    Kees,
    Your approach is excellent and brilliant:-)
    I tried with your steps and i can achieve those alignment in both ways like you said(either on page load/through DA).
    But im going with the DA way. I have certain query regarding this kees.
    <li>Suppose if the report, is classic whether i can go with the same approach that i have achieved alignment with the IR report.
    <li>Currently through the DA way, i used the page item in the condition. Is it possible to use the application item instead of page item in DA. Because im going to use the application item FSP_LANGUAGE_PREFERENCE for getting the code either 'AR' or 'US'.
    <li>Finally i need this kind of restriction for the page item also, consider like i have a page item P1_X with an Element Vertical/Horizontal alignment as left. Now i need to change that alignment to right according to the application page item value, hence i can give application item condition for the page item like below
    PL-SQL EXPRESSION: :FSP_LANGUAGE_PREFERENCE = 'AR'
    i need the element alignment of the page item to behave dynamically suppose if the application item value is AR then the element alignment of that page item has to be right if the application item value is US then the element alignment of that page item has to be left, irrespective of the page item Element Vertical/Horizontal alignment that was set to it.
    Thanks for your kind help
    Brgds,
    Mini

  • Dynamically Update a number field by summing of page item values.

    Hi,
    I'm trying to update a number field on an apex page by summing up the values of multiple page items. I've tried to follow this tutorial http://st-curriculum.oracle.com/obe/db/apex/r40/apexdynactions/apexdynactions_ll.htm , especially the "Create a Set Value Dynamic Action Using PL/SQL" part.
    In the tutorial example they return an page item value P3_SAL multiplied by a multiplier they've determined by another page item's case. What I want to do is much simpler in that I just want to add up multiple page item values and then display them in a number field at the bottom of the page.
    so the code I tried to use based on the tutorial is in the tab: Home >Application Builder>Application 103>Page 3>Edit Dynamic Action>Create / Edit Action
    Set Type: PL/SQL Function Body
    PL/SQL Function Body:
    BEGIN
    return :P3_ITEM1+P3_ITEM2+P3_ITEM3;
    END;
    Page Items to Submit: P3_ITEM1,P3_ITEM2,P3_ITEM3
    But it gives me an error that I need to declare the identifiers, yet it works if I only use one item and I can perform any arithmetic.
    ie.
    BEGIN
    return :P3_ITEM1+1000;
    END;
    Any help would be appreciated.

    PL/SQL Function Body:
    BEGIN
    return :P3_ITEM1+P3_ITEM2+P3_ITEM3;
    END;
    Page Items to Submit: P3_ITEM1,P3_ITEM2,P3_ITEM3
    But it gives me an error that I need to declare the identifiers, yet it works if I only use one item and I can perform any arithmetic.In your code is missing the ":" for the items P3_ITEM2 and P3_ITEM3.
    Try this:
    BEGIN
    return :P3_ITEM1+:P3_ITEM2+:P3_ITEM3;
    END;

  • Dynamic creation of page items

    How can I create page items dynamic, if I have their number and their titles in a page item?

    More often than not you'll run into difficulties when trying to do something like this with APEX. However, you have two options:
    1 - The htmldb_item API, embedding items into a report based on the values of your previous page items.
    2 - Some combination of hidden fields and conditionals that makes use of your page item values for their label text.
    The former is well documented on the forum.
    Rgds
    Ben

  • Very intermittent missing page regions / report rows / page item values

    My goals in making this posting are twofold:
    1. I'm looking to see if anyone else has experienced this type of issue before.
    2. I'm looking for ideas about what can be done to debug such an infrequent bug with serious implications.
    Synopsis
    I'm having a weird problem where very infrequently I will load a page and I'll notice that one or more page regions, report rows, or page item values are missing. If I reload the page the missing parts appear as they normally should.
    By "very infrequently" I would say it happens to me somewhere between 1 in 100 and 1 in 1000 page loads, of course at my last project demonstration in happened twice in 10 minutes to my demo participants. I've attempted to debug this, but most of the techniques I know of involve reloading the page or reposting the form data and (of course) everything looks fine then.
    Environment
    * This has happened on multiple different pages, under ApEx 3.1 (Linux) and 3.2 (Solaris).
    * I believe that so far I've only ever seen this under Firefox 3/3.5 under OSX, but since I do the vast majority of my development with this browser it's not reasonable to conclude that it only happens under Firefox.
    Logs
    * No application errors during this timeframe.
    * Nothing of significance in the database alerts log (just thread notes and log sequences).
    * Nothing of significance in the webserver log (just the usual mod_ossl connection errors).
    Thanks for your attention,
    Jason
    Edited by: Jason G on Jul 24, 2009 12:43 PM

    Well, thanks for reading the post anyway.
    While working through some debugging steps I realized that I was populating some of the regions as the page rendered using AJAX -- this would pause the page rendering until the AJAX request returned. I believe that a hanging AJAX call was the likely culprit of the very intermittent symptoms I was seeing.
    I moved the AJAX calls to the last region of the page and added a javascript function that "watches the page load" by checking for regions by ID and looking at javascript boolean flags to let me know when the page is fully rendered. If this process takes longer than 5 seconds it notifies the user that something happened and offers to reload the page for them in an effort to fix the issue.
    So far, so good -- but it will take a lot of testing to convince me that this case is solved. I hope my documenting this is helpful for others in similar situations.
    Good luck,
    Jason

  • Page item values lost when moving application from 3.1.1 to 4.0.2

    I have an application that is working fine in version 3.1.1, but when I move it to 4.0.2, I'm having some issues with losing page item values. I have a page (6) with master key fields that are used to set page items on another page (7) when I branch to that page. In 3.1.1 the items in the page I'm going to are defined as 'Hidden and Protected' and in 4.0.2 they are defined as 'Hidden' (don't see a 'hidden and protected type'). When page 7 first displays, I see the values I passed in the session items. When I fill in the displayed items on the form and click to create a record, I get errors that the key values are null (these are the items I set when I branched to this page). When I look in the session items now, the values are missing. Why are the values lost and is there a work around?

    Hi there,
    In 4.0.2 there is no hidden & protected item but instead you have one select called "value protected" you can select yes or no there.
    Edit your item and See the "Source" region of your item, in the "Source used" it should be "current value in session state is null" and in "Source type" should be "static assignment..........".
    In the "Default" region the value type should be "static text ......."
    see if there is any changes in these properties.
    thanks
    Tauceef

  • Problem with direction in a page(??????)

    Hi every body,
    I have a problem with direction in some page when i change the language to Arabic(right to left language).
    in some page like welcome page its completely true ,but in some page that i buile with my self (and add some portlet to it like :advanced search portlet)its directon does not appear properly,the label is appear in left, and text box appear in right(its not true).
    what can i do??????????????????
    please answer me :(

    This is not the right forum for your question. Try to post it in the Oracle Application Server Portal forum, or contact Oracle Support.
    Peter

  • Download as in IR Search Bar resets Page Item values?

    Hello,
    i have in an IR a separate region that has Page Items. When i set to these Page Items values and press Go then their values are submitted and used in IR's query. The fetch is correctly being done. Then when i use Download As IR Search Bar, their values are being resetted to that when NULL and query is executed again and fetching wrong results in Excel csv file. Is this the normal behaviour of the Download As option in Search Bar? How can i avoid this resetting ?
    To be more exact the resetting is being done just after pressing the Excel Icon in Download As in Search bar.
    TIA
    Edited by: Dionyssis on 22 Οκτ 2009 6:38 πμ

    Finally i managed to find what caused the problem: i had a process in Before Header that was called from a user button in this area. This process cleared all value of fields and actually doing reset. I have failed to set it conditional upon Reset Request. After doing that it looks like it keeps the result set even in Download as. But i have noticed the following behaviour and i have made a case in apex.oracle.com for examination:
    http://apex.oracle.com/pls/otn/f?p=20695:1
    user/psw: demo/demo
    When you log in do these things:
    0. Open Basic Search Show/Hide Region
    1. Clear Date From and Date To field and tab out (JS scripts put default values)
    2. Click in Search Bar and select Filter
    3. Use as field : User Name, operator: LIKE and value: ADMIN
    4. Press Apply.
    5. It says No data found!
    6. Press Go
    7. It fetches correctly one row!
    Why Apply does not work ? Shouldn't execute the query ?

  • Problem with iChat changing my custom away message after 30 minutes

    Lately, I've been having a big problem with iChat changing any custom away message that I put up to "Away" after 30 minutes or so. Is there anything I can do to make it stop? Another issue I'm having is that sometimes when people on my buddy list change their away message, it doesn't show up on iChat unless I go offline and then sign back on. Any idea why it's doing that, and what I can do to get it to stop?
    Thanks.
    - Danielle
    G3 iMac   Mac OS X (10.3.9)  

    Hi ienjoyanime,
    Go to the General Section of iChat Preferences.
    Does it say you are set to Go to Away when you log off/QUit iChat ?
    is the computer going to Sleep at this point ?
    10:59 PM Saturday; April 1, 2006

  • How to retrieve a page item value in another page?

    Hi,
    how to retrieve a page item value in another page?
    say P55_COURSES_TO_EVALUATE is my page item name and it is a select list.Based on the value selected,in the next page i shd show details related to the selected value and for this i need P55_COURSES_TO_EVALUATE value in the next page.How Do I get it?When I try to retrieve the values it simply returns nothing.
    Any pointers would be really helpful.
    Thanks in advance.

    Hi,
    Could you please tell how you try use it ?
    If you set value to item P55_COURSES_TO_EVALUATE and submit page, value is saved to session state.
    Then you can use that item in any page like
    :P55_COURSES_TO_EVALUATEYou can not access page value in javascript/jQuery from other pages like
    $v('P55_COURSES_TO_EVALUATE')
    document.getElementbyID('P55_COURSES_TO_EVALUATE')
    $(#P55_COURSES_TO_EVALUATE)Because item is not in other pages. In javascript from other pages you can use
    var a = '&P55_COURSES_TO_EVALUATE.';Regards,
    Jari

  • Hi, I'm having problems with viewing a web page created with Adobe Muse CC latest release, I followed the various guides provided by Adobe, but the problem persists. The problem especially concerns the distorted display (the contents do not fit on the pag

    Hi, I'm having problems with viewing a web page created with Adobe Muse CC latest release, I followed the various guides provided by Adobe, but the problem persists. The problem especially concerns the distorted display (the contents do not fit on the page, so it suits size automatically) to a mobile web page to be displayed not on a normal browser, but in a WebView.

    Hi, I'm having problems with viewing a web page created with Adobe Muse CC latest release, I followed the various guides provided by Adobe, but the problem persists. The problem especially concerns the distorted display (the contents do not fit on the page, so it suits size automatically) to a mobile web page to be displayed not on a normal browser, but in a WebView.

  • Really having problems with organising documents in pages. For example, deleting pages deletes the whole section and I cannot insert a section break as its greyed out & sending an object to background deletes several pages - what the **** is going on???

    Really having problems with organising documents in pages. For example, deleting pages deletes the whole section and I cannot insert a section break as its greyed out & sending an object to background deletes several pages and trying to insert a text box autmatically creates new pages- what the **** is going on??? Is this programme really this badly thought out? I thought everything apple was supposed to be intuitive!?!?!? Help.

    You can not insert a section break into a textbox.
    You appear to have a lot of objects with wrap set, that once you take them out of the flow of text (by sending them to the background) causes the text to reflow and contract into fewer pages. Pages is almost unique in the way it forms up pages in Word Processing mode only so long as there is text on them.
    I suspect you probably have hammered away at returns, spaces and tabs as well to position things, which only works to add to the mess.
    Download the Pages09_UserGuide.pdf available under the Help menu and swot up a bit on how it works.
    You may find this a usueful resource as well:
    http://www.freeforum101.com/iworktipsntrick/
    Peter
    PS There is quite a lot of programming in OSX that is far from "intuitive". Pages is easy at one level, when using the templates, otherwise it can be quite frustrating.

  • What is the problem with fonts changing to myriad pro? Is this problem ever going to be resolved? Its driving me mad!

    What is the problem with fonts changing to myriad pro? Is this problem ever going to be resolved? Its driving me mad!

    Browser Dog, Amy,
    The default font remains Myriad Pro until you change it, either in the RGB/CMYK Startup files or in the preferences, options depending on versions.
    Concerning missing font names, I believe this may solve it:
    Open System Preferences and go to Accessibility. Next, select Display from the source list along the left, then check the box labelled Reduce transparency.
    It was first presented in this post #15 by TheUlser:

  • After Effects won't close/Problems with dynamic links

    When I quit After Effects the icon still shows up and it says that it is still open, even force quit will not work. Also having problems with dynamically linked files between after effects and Premiere pro. Rendering in Premiere doesn't work unless I go to AE, save the project, then go back to Premiere. I have OSX Mavericks 10.9.2, a late 2012 mac pro, and AE CC 12.2.1.5

    Kevin: would appreciate further thoughts on this.
    I am using Pr2014, version 8.0.0 I am using AE2014, version 13.0.2.3. When I was on earlier versions of each, I had no problem importing AE comps into Pr. I'd choose import in Pr, then select the AE project, then select the comp. But with my new and improved versions of AE and Pr, I keep getting "importer reported a generic error."
    I also tried to go the other way. I selected in Pr the clips I wanted to work on in AE, and then tried "replace with AE comp" but got the "generic error" message again..
    Finally, I attempted to create a Dynamic Link from Pr via the File menu, but with each of the options from there, I got "failed to connect to AE Dynamic Link"
    Any advice you can share, would be most welcome.

  • Call print apex_util.get_print_document() with page item values

    Hi all
    I ran into an issue that very frustrated as it sounds so simple.
    I'm in Apex 3.1.
    My database has table TAB_CLASSES, TAB_STUDENT
    My application has page 1 with P1_SID is student_ID
    I had an simple report query name Class_query, show all classes that a student attends
    select * from TAB_CLASSES where SID = :P1_SID;
    I also select option "include application and session information"
    I had report template Class_template
    In my application, I have a process tried to generate report list classes for all students.
    l_report blob;
    for x in (select * from TAB_STUDENT)
    loop
    :P1_SID := x.SID;
    l_report := apex_util.get_print_document (
    p_application_id => :APP_ID,
    p_report_query_name => 'Class_query',
    p_report_layout_name => 'Class_template',
    p_report_layout_type => 'rtf',
    p_document_format => 'pdf'
    insert all the l_report into database with SID as a part of l_report name (*) 
    end loop;
    After this, I got multiple of l_report blob in database, number of report is exactly number of student in the TAB_STUDENT table. The problem is that every report looks the same, and it got the information of only first student
    I guessed it did not pass the item value (P1_SID) every time it call the get_print_document, but it still shows in the report name (*)
    Please help me. Thanks for any idea.
    Teiv
    Edited by: teiviag on Mar 10, 2010 7:16 AM

    This post had the same problem with me
    [ http://forums.oracle.com/forums/thread.jspa?threadID=663186&start=0&tstart=0|http://forums.oracle.com/forums/thread.jspa?threadID=663186&start=0&tstart=0]
    Thanks for the post of Marc, about how variables are binding and calling by process, I changed my app design to have a sp to print and store the pdf file. Then in my app, I just called the sp and passed the P1_SID. It worked.
    Thanks.
    Edited by: teiviag on Mar 10, 2010 10:49 AM
    Edited by: teiviag on Mar 10, 2010 10:50 AM
    Edited by: teiviag on Mar 10, 2010 10:50 AM

Maybe you are looking for

  • HP Pro 3500 Microtower PC drivers for Windows XP 32bit

    Hello, May I kindly ask if it would be possible to assist me in terms of locating Windows XP Home Edition (32 bit) drivers for the  HP Pro 3500 Microtower PC (product number F4Q49ES )? <script type="text/javascript" language="JavaScript">// var theme

  • Required steps to add standard SAP field to Work Manager 6.0

    Dear Agentry experts, I need some help on how to add standard SAP backend fields to the Work Manager 6.0 application. The application is freshly setup and not yet customized apart from filters, so we are also new to develop it. Specifically we want t

  • Power Management Driver wont install in Windows 7

    Hi All, I've been trying to get my blue Fn keys to work on my recently purchased SL500.  Volume and screen brightness keys work (but no on-screen display), however Fn+F3 & F5 do nothing, as does the blue ThinkVantage button.  Installed drivers via Sy

  • Did a System Restore, Lost previous versions of OS X Updates

    So my hard drive died.  Got a new HDD, formatted and installed OSX Snow Leopard from the recovery disk that came with the computer.  Everything up and running just fine.  App store icon has a line through it and cannot open due to the software not be

  • Using libraries burned on disc

    Hi, I have a bunch of albums burned to a DVD. I have deleted them from my current library. When I insert the DVD, iPhoto launches and displays them in the sidebar. I can go and view the photos without a problem. But with these albums on disc, I am un