How to calcluate a filed based on two other fields after TABING out.

Hi,
I need my third field be calculated based on the previous two fields after tabing out from each field.
Price Quantity Amount
12 10 120
Both price and Quantity is text box and amount is readonly.I want if I change Price from 12 to 15 and tab out then amount should automatically get changed to 150.
Regards,
Prakash

I believe you can use Partial Page Rendering (PPR) to accomplish this. You'd place a 'firePartialAction' event on the input field. This event would fire when you tab out and then you can invoke controlelr logic to set the other two fields appropriately.
Check out the OA Framework Developer's Guide for examples.

Similar Messages

  • Need Trigger that format a field based on two other fields

    Hello!
    I need to write a trigger, that reads on field and made some changes to it and saves the result in an other field in the same row. The trigger should work in insert and update cases.
    Does anybody can send me a frame, where i can fill my logic?
    Regards
    Heiko Glaeske

    In this example, column1 and column2 are the values being examined and the resultant expression is saved in column3.
    create or replace trigger trigger_name
    before insert or update on table_name
    for each row
    begin
      :new.column3 := :new.column1 + :new.column2;
    end;
    /

  • How do I make a form field validate that it is the sum of two other fields?

    Hi there,
    I am creating a form, and I would like one of the fields to validate by making sure that this field is the sum of two other fields in the form.  Does anyone have any ideas on how to go about this?  I know I'll need to run a custom validation script, but I'm not sure where to begin - I've never done one for validation before.
    Thanks for any help!

    OK, here's a sample script that I hope will clearly demonstrate the general approach. It is intended to be the custom Validate script of the field that the user enters that value that is supposed to be equal to the sum of the two others.
    // Custom Validate script
    (function () {
        // Get the value that the user entered
        var sVal = event.value;
        // If it is blank, do nothing else
        if (!sVal) {
            return;
        // Convert string to a number
        nVal = +sVal;
        // Get the values of the fields, as numbers
        var v1 = +getField("text1").value;
        var v2 = +getField("text2").value;
        // Add them together, rounding to two decimal places, converting to number
        var sum = +util.printf("%.2f", v1 + v2);
        // Compare entered value to the sum of the other two fields
        // Alter the user if they do not match
        if (nVal !== sum) {
            app.alert("The value you entered does not equal the sum of text1 and text2. Please correct.", 3);
            // If you want the entered value rejected, include the following
            event.rc = false;
    Replace "text1" and "text2" with the actual field names.

  • Question on populating a field based on 2 other fields

    Hi,
    I am looking for a solution wherein I need to populate a field (say no of days) based on the other two fields selected by the user (say date from and date to). As soon as user selects the value on "date to" field, "no of days" field should be auto-populated as the value from "date to - date from". I have tried using setter and getter methods on all three field, set valuechangelistener on date to field, set auto submit to true and in the valuechangelistener event code, I am doing the calculations as mentioned in the below snippet.
    public void onChangeDateTo(ValueChangeEvent evt){
    this.dtDateTo= (java.util.Date)evt.getNewValue();
    this.dtDateFrom = (java.util.Date)getDateFrom();//This is the getter method for date from field
    System.out.println("onChangeDateTo "+ this.dtDateFrom+":"+this.dtDateTo);
    if (evt.getNewValue() != null){
    int intCalcNoOfDays = DateHelper.getBusinessDaysCount(this.getDateFrom(),this.getDateTo()) + 1;// my custom class which does the calculation
    String strCalcNoOfDays = String.valueOf(intCalcNoOfDays);
    System.out.println("strCalcNoOfDays "+strCalcNoOfDays);
    this.setNoOfDays(strCalcNoOfDays);
    I am getting NullPointerException while getting the value for date from (this.dtDateFrom). I have tried other approaches like attaching a binding to date from field, passing attributes etc but no luck. Can someone assist me in achieving this? Basically I need to populate one field automatically based on values entered on two other fields whenever tab event/user selects value on second field AND it shouldn't fire any other validations on the form (basically partial trigger).
    Thanks very much for the help in advance.
    Thanks
    Shree

    Thanks Lilly.
    I don't have a backing bean associated with the page. I have managed bean instead. JSF source code snippet below
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich" xmlns:h="http://java.sun.com/jsf/html">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document title="LMS" id="d1">
    <af:messages id="m1"/>
    <af:form id="f1">
    <af:panelStretchLayout id="psl1" startWidth="160px">
    <f:facet name="top">
    <af:panelGroupLayout id="pgl1" layout="vertical" halign="center">
    <af:panelFormLayout id="pfl1" rows="1" maxColumns="1">
    <af:outputText value="LMS" id="ot1"
    inlineStyle="color:Blue; font-family:'Times New Roman', 'Arial Black', times, Serif; font-size:175%; font-weight:bold; text-align:center;"/>
    </af:panelFormLayout>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="bottom">
    <af:panelGroupLayout id="pgl2"/>
    </f:facet>
    <f:facet name="center">
    <af:panelGroupLayout layout="scroll" id="pgl4">
    <af:outputText value="Dashboard" id="ot6"
    inlineStyle="color:Green; font-size:150%; font-family:'Times New Roman', 'Arial Black', times, Serif; font-weight:bold; text-align:center;"
    visible='#{clickActionHandlerBean.clickLink== "HOME"}'/>
    <af:spacer width="10" height="10" id="s1"
    visible='#{clickActionHandlerBean.clickLink== "HOME"}'/>
    <af:spacer width="10" height="25" id="s5"
    visible='#{clickActionHandlerBean.clickLink=="APPLY"}'/>
    <af:panelFormLayout id="pfl2" rows="1" maxColumns="1"
    visible='#{clickActionHandlerBean.clickLink=="APPLY"}'>
    <af:selectOneChoice label="Type" id="soc1" showRequired="true"
    immediate="true" value="#{bean1.type}">
    <af:selectItem label="X1" value="X1" id="si1"/>
    <af:selectItem label="X2" value="X2 id="si2"/>
    <af:selectItem label="X3" value="X3" id="si3"/>
    <af:selectItem label="X4 value="X4" id="si4"/>
    </af:selectOneChoice>
    </af:panelFormLayout>
    <af:panelFormLayout id="pfl3" rows="1" maxColumns="3"
    visible='#{clickActionHandlerBean.clickLink=="APPLY"}'>
    <af:inputDate label=" Date From" id="id1"
    rendered='true'
    showRequired="true" inlineStyle="vertical-align:baseline;"
    value="#{bean1.dateFrom}">
    <af:convertDateTime pattern="dd-MMM-yyyy" secondaryPattern="MM/dd/yyyy"/>
    </af:inputDate>
    <af:inputDate label="Date To" id="id2"
    rendered='true'
    showRequired="true" value="#{bean1.dateTo}" partialTriggers="it1"
    valueChangeListener="#{bean1.onChangeDateTo}"
    autoSubmit="true">
    <af:convertDateTime pattern="dd-MMM-yyyy" secondaryPattern="MM/dd/yyyy"/>
    </af:inputDate>
    <af:inputText label="No of Days" id="it1" columns="7" showRequired="true"
    rendered="true" value="#{bean1.noOfDays}" maximumLength="2">
    <af:validateRegExp pattern="[0-9]{1,10}"
    messageDetailNoMatch="No of days can have only numbers"/>
    </af:inputText>
    </af:panelFormLayout>
    <af:spacer width="10" height="50" id="s6"/>
    <af:group id="g1">
    <af:spacer width="250" height="10" id="s7"
    visible='#{clickActionHandlerBean.clickLink=="APPLY"}'/>
    <af:commandButton text="Save" id="cb1" partialSubmit="true" blocking="false"
    immediate="false"
    visible='#{clickActionHandlerBean.clickLink=="APPLY"}'
    actionListener="#{bean1.ApplyButtonClicked}">
    </af:commandButton>
    <af:spacer width="20" height="10" id="s8"/>
    <af:commandButton text="Cancel" id="cb2"
    visible='#{clickActionHandlerBean.clickLink=="APPLY"}'/>
    </af:group>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="start">
    <af:panelGroupLayout id="pgl3" halign="left">
    <p>
    <af:outputText value="#{userinfo.userInfo.firstName}" id="otWel"
    inlineStyle="color:Maroon;" rendered="false"/>
    </p>
    <af:spacer width="1" height="50" id="s2"/>
    <p>
    <af:commandLink text="Home" id="glHome" action="#{clickActionHandlerBean.showHomeRN}"/>
    </p>
    <p>
    <af:commandLink text="Apply" id="glApply"
    action="#{clickActionHandlerBean.showApplyRN}"/>
    </p>
    </af:panelGroupLayout>
    </f:facet>
    </af:panelStretchLayout>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    Thanks
    Shree

  • How do I return users to webpage they were on after filling out online form ?

    How do I return users to webpage they were on after filling out online form ?

    Add a Redirect URL to the form.
    This tutorial explains:
    http://forums.adobe.com/thread/869660

  • How do I pass a value between two selectOneChoice fields

    I have two selectOneChoice (LOV fields) on the same JSF page (trinidad form). How do I pass the value from the first field to the second one?
    AutoSubmit=true;PartialTriggers doesn't work.
    I used SetActionListener to copy the value from the first LOV to a pageflow variable ( #{pageFlowScope.x} ) but that didn't work either. I wasn't sure how to reference it in the second LOV ...
    thanks
    John

    <af:selectonechoice value="#{bindings.select1.inputValue}" id="select1" autoSubmit="true">
    <af:setPropertyListener from="#{row}"
    to="#{pageFlowScope.detail}"
    type="valueChange"/>
    </af:selectonechoice>
    <af:selectonechoice value="#{pageFloScope.detail}" id="select2" partialTriggers="select1"/>
    The above code is a rough example. you can do the same using the valuechangelistener for the first lov and set the value for the second one..
    you can refer this
    How to set value for selectOneChoice

  • How i can stop sharing my contacts with other iphone after installing find my iphone?

    After installing find my iphone in other devices my contacts starting sharing with that device. How i can stop that?

    The two devices are using the same iCloud ID, hence they are syncing the contacts, as the system is designed to do.
    BTY, I'm not sure what your intention was to install the Find My iPhone app, but if you are trying to start that service, the app won't help. It is intended to locate OTHER devices.  To start the Find My iPhone service, you do it via the settings.

  • Sapscript - displaying two text fields after truncating the spaces.

    Hi Friends,
    In a sapscript, I have to display the name of the vendor which is in two different fields each of length 40 chars. The first one may be filled to the maximum and the remaining goes into the second field and may occupy only 30 or 35 chars. I need to display the two side by side and the space available is 70 chars. I am using an existing script and I am not able to print the two side by side. It is going to the next line. How do I truncate the trailing spaces of either field. Please help. It is quite urgent.
    Thanks,
    BP.

    Hi Bindu,
    use the perform to concatenate name1 and name2 to NAME and use this field in address command.
    Check with the following code:
    /:   DEFINE &ZNAME& = ''
    PERFORM ADDRESS IN PROGRAM 'PROGRAM'
    USING    &REGUH-ZNME1& 
    USING    &REGUH-ZNME2&                             
    CHANGING &ZNAME&                       
    ENDPERFORM                                      
    FORM address
              TABLES itab STRUCTURE itcsy
                     otab STRUCTURE itcsy.
    LOOP AT itab.
        CASE itab-name.
          WHEN 'REGUH-ZNME1'.
            l_name1 = itab-value.
          WHEN 'REGUH-ZNME2'.
            l_name2 = itab-value.
        ENDCASE.
      ENDLOOP.
    use the logic.
    Endform.

  • Newbie - Adobe 7 Prof - How do you automatically clear fields after filling out form and printing

    A form housed in a database displayed on the web, allows the user to open, fill out some information and then print using the "Print button". How can I have the form automatically reset the fields to blank after the form is no longer being viewed on the screen or even after printing? If user goes back to the same form later without rebooting or cacheing, the information that was entered is still there. I'm new to this and have very little scripting experience. Your help would be VERY appreciated.

    I've read the article at the website provided. Can you provide specifics on what to add where. I'm working in Adobe Designer 7.0...are the changes to be made there or in the Adobe Prof 7.0 for the Client?

  • How to find the sum based on two variables

    Hello!
    I have just started using Numbers, I have a spreadsheet which lists a number of transactions.
    On my chart I have Columns "Date", "Memo", "Type", and "Amount".
    The Type column is a drop down list. What I want to do and find the sum for transactions that fall between a date range (i.e. months 1-3) and that match a certain "Type". I can figure out how to use the sumif function to find the sum for a date range, however I cant figure out how then to only sum only those that match a type.
    Any help?

    Brendon,
    This question arises from time to time in different situations. The answer is to first create an auxiliary column which calculates whether or not your multiple conditions have been met. In this case you have three - more than or equal a start date, less than or equal an end date, and a "Type".
    I'm assuming that your dates and "type" are flexible, so an extra table to enter your search data is shown below, but these three cells could be incorporated in your main table. The formula for the auxiliary column is:
    =IF(AND(Date>=Search Range :: A$2,Date<=Search Range :: B$2,Type=Search Range :: C$2),"SUM","")
    All rows with the word "SUM" satisfy the three conditions. The footer row contains the sum of the values meeting the desired conditions using:
    =SUMIF(Aux, “SUM”, Amount)
    Obviously this has to be reworked to your situation, but the auxiliary column is the key.
    pw
    Message was edited by: pw1840

  • Find missing values in third table based on two other tables

    Hi- I have tried to do this on my own but the answer eludes me. Can someone please point me in a better direction? We have a table project_categories with project_IDs and related project category_IDs. We have another table contact_categories with contact_IDs and related contact category_IDs. We use these two tables to link contacts to projects by at least one category_ID. It works well for email notifications. We have a third table for "planholders" who are interested in particular projects. The planholder table has contact_IDs and related project_IDs. I want to find contacts who have expressed interest in a project, by inserting a row in the planholder table, but they have not selected any of the project categories in contact categories. This would be an unusually rare exception, so to test it I added myself as a contact 100010 and as a project "planholder", but deliberately did not select any of the related project categories in contact categories.
    select ph.contact_id, ph.project_id, pc.category_id, cc.category_id
    from purchasing_planholder ph, purchasing_project_categories pc, purchasing_contact_categories cc
    where ph.project_id=pc.project_id
    and ph.contact_id=cc.contact_id
    and ph.contact_id||ph.project_id||cc.category_id
    not in (select ph.contact_id||pc.project_id||pc.category_id
    from purchasing_planholder ph, purchasing_project_categories pc, purchasing_contact_categories cc
    where ph.project_id=pc.project_id
    and ph.contact_id=cc.contact_id)
    and ph.contact_id=100010
    This gives me every category for the test contact and every category for the project. I want to find contacts in the planholder table who have not selected any of the categories related to the specific project they selected in the planholder table. I tried minus, outer joins, etc. Does this require PL/SQL and a temp table, or can I find the exceptions with a report? Or do I need a different approach? The ideal answer would display one row with the contact_ID and the project_ID, where the contact has not selected any of the project categories. This would be used to alert them that they need to select at least one of the project categories on the contact form. Thanks for any feedback.
    Peter
    CONTACT_ID PROJECT_ID CATEGORY_ID CATEGORY_ID
    100010 701 1 19
    100010 701 1 18
    100010 701 16 19
    100010 701 16 18
    100010 701 21 19
    100010 701 21 18
    100010 701 24 19
    100010 701 24 18
    8 rows selected

    Hi User,
    When you Post a Question in Forum, Please be clear of the Inputs to be given, the expected output and the tries you made,
    the errors/results you faced.
    Also, see this link of BluShadow.
    SQL and PL/SQL FAQ
    Please enclose the query or programs in code tags for a formatted code.
    Just Try something like this,
    SELECT *
      FROM emp c
    WHERE NOT EXISTS (SELECT *
                         FROM emp a
                        WHERE EXISTS (SELECT *
                                        FROM emp b
                                       WHERE a.empno = b.empno));In the Inner Query, the conditon checked is empno same in both the tables, and for example some rows are obtained, other than
    this rows all other results are obtained from the outer query.
    In the above case no rows are returned.
    Thanks,
    Shankar

  • How to show limited items based on a custom field

    Is there a way to show only web app items based on the custom date field? For example, i want the module to only show web app item(s) whose "event date" is "today"....  ?? Help please!

    There has to be a jQuery plugin that can help you do that... just search on Google, Stackoverflow, etc...
    There's one that SimpleFlame wrote via Kiyuko but it's a premium offering:
    http://kiyuco.com/tutorials/create-a-web-app-driven-event-calendar

  • Query Designer: Calculate a % based on two other totals

    Hi Gurus,
    Here is the scenario of my query:
    A     B     C     D     E
    2      3     6     4     150%
    1      2     2     4     50%
    2      2     4     8     50%
    1      1     1     10   10%
    6      8     13    26   50%
    Column C is calulated by AB and I am able to get the total 13 instead of 48 (68) by using the "Total" calculation function.
    The problem is about the Total of Column E. It is a % based on columns C versus D. There's no problem for individual results, but for the total I cannot get the 50% because my query calculates the total result comparing 48 (6*8) Vs 26.
    If I also use the Total function for the E Column, what it shows is an addition of all the individual results, so 260%.
    I can't find the way to get the Total 50% that takes the "Total" function of Column C and Column D.
    Please, any idea so solve this scenario?
    Many thanks!!
    Regards,
    Jordi

    Hi,
    The "Calculate Result As" is a Display option. That value is not considered in the calculations, only for display.
    You may try "Exception Aggregation" , 'Total' for Column C with Ref Characteristic being the Char at the lowest level of which you see the data and try.
    For eg: you can to calculate A x B for Materials, but at all levels higher than material you want A1 x B1 + A2 x B2 + .....
    Then you create CKF/Formula C = A x B with Exp Aggregation, Total, Ref Char = Material.

  • ALV grid total  or based on two key fields

    Hello experts,
    I have ALV grid with  vendor, g/l account and amount field.
    I want to have sum or total of each vendor, and if vendor having mutliple g/l accounts i want to have sum for each g/l account.
    ex:  vendor   g/l account    amount.
            10           aa                  100
            10           bb                  200
            11           cc                   300
    olp   :   10      aa   100
                10      bb   200
                11      cc   300
    ex2 :   vendor g/ account   amount
               10       aa                 100
                10       aa                200
                11        cc               300
    o/p       10   aa   300.
                11  cc    300.
    Could you please help me and any suggestions
    <<Text removed>>
    Thanks
    reddy.
    Edited by: Matt on Jul 27, 2011 9:21 AM

    Hello Reddy,
    Try using the sort functionality of ALV grid
        CALL METHOD grid1->set_table_for_first_display
          EXPORTING
            i_save                                           = 'A'
            is_layout                                      = lwa_layout
            it_toolbar_excluding                    = i_excl_func
            i_default                                      = c_x
          CHANGING
            it_outtab                                     = i_outtab[]
            it_fieldcatalog                             = i_fieldcat[]
            it_sort                                         = li_sort[]            "use this functionality as per your requirement
          EXCEPTIONS
            invalid_parameter_combination  = 1
            program_error                            = 2
            too_many_lines                          = 3
            OTHERS                                      = 4.
    Hope this may be helpful.
    Sharin

  • How to add a line between the two text fields  in JTabbed Pane

    Hi Friends,
    I would like to add a Line between some text fields to seperate them.. I added those text Fields to a tabbed Pane.. Please help me to create a line between the TextFields......

    http://java.sun.com/docs/books/tutorial/uiswing/components/separator.html

Maybe you are looking for

  • Error while using ajax addParam function in on demand process

    Hi , I am calling an on demand process from a javascript that inserts value from a modal from into a table. function f_insert_transaction() var ajaxRequest = new htmldb_Get(null, $v('pFlowId'), 'APPLICATION_PROCESS=insert_manual_transaction',73);    

  • Date format conversion from MySQL

    Hi my dear friends. I have some problem with the date format. I am using MySQL version 3, LabSQL and Labview7.1 In the MySQL, the date format reads as 2006-12-18 14-51-25 while, when querying in Labview, it reads 18-Dec-06 14-51-25. So when using thi

  • Set a file icon from image file of same name

    I have a folder of files and I have another folder of images that have the same names as the files. What I would like to do is apply an icon of each image to it's corresponding file. Is this possible? Any help would be greatly appreciated. Ian

  • Retina Display Support in Photoshop Elements 12

    I've just upgraded from version 9, mainly because I thought 12 would have Retina display support now, like CS6 does. To my surprise, it doesn't! What's the deal here? There are a *lot* of people buying MacBook Pros with retina displays, millions. Is

  • 2nd hard drive for Dual 500 MHz Sawtooth

    I have a G4 dual 500 MHz sawtooth with a 40 GB hard drive and 1 GB of RAM. I don't have any PCI slots left and I was hoping to add a second drive. Is this possible? Does this model have the ribbon and power supply for a second drive? I've been search