Calculate the values in the table

I have a table with several lines. have 2 input text in each row of the table. In the same vein, there is a field (outputText) whose calculation is based on the insertion of data from the other two.

the calculation is performed correctly.

the problem occurs when I have more q a row in the table. If you have 3 lines, for example, are calculated for a line (not being not not the first) to the other lines that this field is null / empty.

I think that it does not have the iterator. Anyone help me?

Hi user,

Calculate the difference using the class viewrow for more information

Look at the blog below could help ful

Andrejus Baranovskis Blog: Column calculated in ADF Faces component af:table

Tags: Java

Similar Questions

  • Calculate the maximum value of the sub-table when creating using a structure of case and records the shift

    I have two 1 d arrays that contain cyclical information (a bit like a sine wave).  One that contains information about the position in degrees and another that contains the couple.  I would like to calculate the value of maximum torque whenever the station is within a certain range (for example, 30 to 80 degrees).  The beaches are repeated - that is why it is cyclical.   I use the function "in the range", a structure of the case and the shift records to build a new table with the values that are included in the beach I said - that was easy part (see attached VI).  I'm struggling with a way to calculate a maximum value for each sub-table formed when the values are 'in range '.   Your help is very appreciated.

    vt92 solution worked!  I agree that there should be a simpler solution, but your to works fine.  Thank you very much.

  • How to calculate the sum of the values of some columns in a table

    Hello

    I want to get the column just the average of the values of some columns not all columns of the table.what I have to change exactly in this block diagram.even if the table size is 25 average, I want the division as the number of values in each column (= number of lines)

    just like that:


  • Calculate the distance using values from table

    Based on the coordinates of two points A(x1,y1) and B(x2,y2) and x 1, x 2, y1, y2 are columns of the table to a table, I need a query (function?) to calculate the distance between these two points of each line of the table...
    Table:
    NRCRT (PK) X 1 X 2 Y1 Y2
    1 10 6 2 4
    2 1 3 0 5

    the mathematical formula is:
    http://www.mathwarehouse.com/algebra/distance_formula/images/distance-formula-image.jpg

    It is complex to me, but maybe someone can help me...

    Wintermute3190 wrote:
    Œuvres, but:
    DISTANCE_BETWEEN
    4.47213595499957939281834733746255247088
    5.3851648071345040312507104915403295563

    How to set to 5,38 just and 4.47

    CYCLE of use or function TRUNC

    SQL> WITH test_tab AS
      2       (SELECT 1 nrcrt, 10 x1, 6 x2, 2 y1, 4 y2
      3          FROM DUAL
      4        UNION ALL
      5        SELECT 2, 1, 3, 0, 5
      6          FROM DUAL)
      7  SELECT nrcrt,
      8         TRUNC(SQRT ((POWER ((x2 - x1), 2) + POWER ((y2 - y1), 2)
      9               )),2) distance_between
     10    FROM test_tab
     11  /
    
         NRCRT DISTANCE_BETWEEN
    ---------- ----------------
             1             4.47
             2             5.38
    
    SQL> WITH test_tab AS
      2       (SELECT 1 nrcrt, 10 x1, 6 x2, 2 y1, 4 y2
      3          FROM DUAL
      4        UNION ALL
      5        SELECT 2, 1, 3, 0, 5
      6          FROM DUAL)
      7  SELECT nrcrt,
      8         ROUND(SQRT ((POWER ((x2 - x1), 2) + POWER ((y2 - y1), 2)
      9               )),2) distance_between
     10    FROM test_tab
     11  /
    
         NRCRT DISTANCE_BETWEEN
    ---------- ----------------
             1             4.47
             2             5.39
    

    Notice the difference in the result. Use the one that works best for you.

    Kind regards
    JO

  • Calculate the average value

    the data that I measured changed quickly, so I want to get the average value of the data

    Don't tell me to use mean.vi, I already know.

    and I got an idea that is to add data in a table every time, then the sum of all value data and take the line of result by the number of items

    but I don't know how to do this, anyone can build a simple vi to show me? Thank you

    I enclose my vi that uses mean.vi to the average value of calc, you can remove it and help in your path, thank you!

    Do not add your data in a table that grows forever. What a waste of RAM. To calculate the average, you only need to sum and N.

    Here is a simple code to accumulate the sum of the values in a shift register and divide by the number of add operations.

  • Not able to print the decimal values in a table

    Hi all

    I created an application. Here, I have a table with three columns Col1 and col2 are numbers and col3 is the diffrence between col1, col2.

    I use AJAX and JavaScript to calculate the difference in a dynamic way.

    I am able to print the difference as for example:-1, 2, 1.5-1.5. but not 0.8, 0.8, 0.1 etc...

    If col1 col2 = 1.2 - capable of printing

    If col1 to col2 = 0.2 - error, unexpected token

    error_07012016.PNG

    -Code AJAX:

    Declare  
      p_curr  number;  
      p_prev    number;  
      p_diff number;  
    Begin  
      p_prev    := to_number(apex_application.g_x01);  
      p_curr    := to_number(apex_application.g_x02);  
      
       
      SELECT to_number(p_curr - p_prev) into p_diff  
      from dual;  
      
      -- return calculated value
      sys.htp.p(p_diff);  
    End;
    

    -JavaScript: running the loading of the page

    function f_calulate_duration(pThis) {  
    
      var row_id     = pThis.id.substr(4);  
      var s          = $('#f18_'+row_id).val().replace(/[^\d.-]/g, ''); 
      var curr       = $(pThis).val().replace(/[^\d.-]/g, ''); 
    
    if(!s){
      var s= 0;
      var prev = s;}
    else{
      var prev = s;}
    
    apex.server.process 
    ( "CALC_DIFF", { x01: prev, x02: curr }, 
    { success: function( pData ) { 
    $('#f23_'+row_id).val(pData);}}
    );  
    }  
    

    Please suggest the solution to this.

    Oracle Apex Version: 4.2.

    Thank you

    Dev

    Hello

    I don't get the point to use the expensive AJAX call to the database, instead you can have the same functionality with JavaScript code below.

    function f_calulate_duration(pThis) {
      var row_id     = pThis.id.substr(4);
      var s          = $('#f18_'+row_id).val().replace(/[^\d.-]/g, '');
      var curr       = $(pThis).val().replace(/[^\d.-]/g, '');   
    
    if(!s){
      var s= 0;
      var prev = s;}
    else{
      var prev = s;}
    
    var diff = 0;
    diff = curr - prev;
    var n = diff.toFixed(2);
    alert(n);
    $('#f23_'+row_id).val(n);  
    
    //-- Remove this code
    /*apex.server.process
    ( "CALC_DIFF", { x01: prev, x02: curr },
    { success: function( pData ) {
    $('#f23_'+row_id).val(pData);}}
    );*/
    
    }    
    

    Thank you

    D

  • Calculate the elapsed time between the horodateurs log Table

    Hello

    I'm looking for some codes SQL allows to calculate the elapsed time between the timestamps in a log table.  The log table has some STOP-START operations.

    I just want to calculate the elapsed time between the START and PAUSE of Transactions, as well as START and EXECUTE transactions.

    So, in the example below, the time spent must be:

    START 09:15 break 09:20 (5 Minutes)
    START 09:30 to 09:45 (15 Minutes) FULL

    Total elapsed time for LOG_ID 1234 should be 20 minutes.  This excludes the 09:20 at 09:30 BREAK at the START time.

    LOG_ID

    SEQ_NUM

    LOG_TYPE_CD

    CRE_DTTM

    1234

    1

    BEGINNING

    09-15 - 2013:09:15:00

    1234

    2

    BREAK

    09-15 - 2013:09:20:00

    1234

    3

    BEGINNING

    09-15 - 2013:09:30:00

    1234

    4

    ALL THE

    09-15 - 2013:09:45:00

    Any suggestions?

    Thanks for your time

    -DT

    Hello

    Thanks for posting the CREATE TABLE and INSERT.  be sure to post the results desired from these data.

    user13071913 wrote:

    Hi thanks for the help...

    The date is a true timestamp.  ...

    Here's a sample of CREATE TABLE and a few inserts.  3 ID transaction, each with a series of journal entries.

    CREATE TABLE 'LOG_TABLE_X '.

    (SELECT 'ID' CHAR (14 BYTES) NOT NULL,)

    ACTIVATE THE "LOG_TYPE_FLG" TANK (4 BYTES) NOT NULL,

    ALLOW "LOG_DTTM" DATE NOT NULL

    );

    ...

    I'm so confused.  Is log_dttm a TIMESTAMP, you said in the story, or is it a DATE, as you say in the CREATE TABLE statement, or is it a VARCHAR2 as Thur INSERT statements?  I'll assume it's a DATE.

    I left out an important step yesterday.  The computation of the last_start, we need to use a CASE statement so that we record only the time of events STRT.

    Here's the revised query:

    WITH got_last_start AS

    (

    SELECT id, log_type_flg, log_dttm

    LAST_VALUE (CASE

    WHEN log_type_flg = "STRT".

    THEN log_dttm

    END

    IGNORES NULL VALUES

    ) OVER (PARTITION BY id - can - be

    ORDER BY log_dttm

    ) AS last_start

    OF log_table_x

    )

    SELECT id, log_type_flg, log_dttm

    , (log_dttm - last_start) * 24 * 60 elapsed

    , SUM (log_dttm - last_start) OVER (PARTITION BY ID.

    ORDER BY log_dttm

    ) * 24 * 60 AS total_elapsed

    OF got_last_start

    WHERE log_type_flg IN ("CMPT", "PAUS")

    ORDER BY id, log_dttm

    ;

    Output of your sample data:

    ID LOG_ ELAPSED TOTAL_ELAPSED LOG_DTTM

    -------------- ---- ------------------- -------- -------------

    1111 PAUS 09-26 - 2013:09:09:58.17.17

    1111 CMPT 09-26 - 2013:10:09:58 1.00.83

    2222 CMPT 09-26 - 2013:12:09:58 180.00 180.00

    3333 CMPT 09-26 - 2013:10:09:42 59.73 59.73

    In Oracle, when you subtract one DATE from another DATE, the result is the NUMBER of days between them.  In the above query, I multiplied the past columns and total_elapsed by the number of minutes per day (24 * 60), to show the time in minutes.

  • Add numeric value in the column in the Table

    Hello
    My problem:
    I have a VO with a numeric attribute (Sal). This VO is present in a table in a JSF Page.
    I need to add a numerical value to the value of the column.

    I have try it with #{row.bindings.Sal.attributeValue * 2} or #{rank. SAL + 2} or #{rank. Sal.inputValue + 2} but I get an error.

    Can someone help me?

    Thank you

    11.1.3 JDev

    Hello

    one option would be to use a transitional attribute in the VO to calculate math or to fill in the field column of a managed bean. You can point the field for the column to a property of the managed bean (say sumSal). In this getSumSal() method you

    1. use ELContext and ValueExpression ExpressionFactory to resolve the reference #{line} (you can cast oracle.jbo.domain.Row
    2. call the row.get ("attribute_name") to access the value of the field
    3 compute and return the value to display in the table

    Note that using a transitional attribute may be easier to achieve and easier to reuse in other uses of the VO. However, you will have options

    Frank

  • The legacy of values on the expansion of the tables

    Hello

    I have a drop-down list (unlimited package) including rawValue sets/triggers the value field & access to another field of drop-down list (BillStudent) which resides in an expandable row in a table. However, I want all cases/additional lines that are added to the table to inheret the value defined by (unlimited package) when you add more lines.

    What I have right now is this where "Admin_Use = name of the form, table 3 = Table name, Row1 = line Explandable and BillStudent = combo box residing in the line.

    Under the 'exit' event

    If (FlatRate.rawValue == 2) {}

    Admin_Use.table3.Row1.BillStudent.RawValue = 3;

    Admin_Use.table3.Row1.BillStudent.access = 'protected ';

    }

    else {Admin_Use.Table3.Row1.BillStudent.rawValue = null;

    Admin_Use.table3.Row1.BillStudent.access = "open";

    }

    The code works as I want it, for the first existing line. However, when I add another line, the new line does not have the same value as the previous. I want to repeat this value for all new instances added to the table.

    Thank you very much!!!

    J

    Hello

    I think you can get what you want by moving your code from the output event of unlimited plan for the event of Row1 calculate, so it will look something like;

    If (FlatRate.rawValue == '2')

    {

    BillStudent.access = 'protected ';

    BillStudent.rawValue = '3 '.

    }

    on the other

    {

    BillStudent.access = "open";

    BillStudent.rawValue = null;

    }

    Note: The reference to FlatRate maybe wrong according to the structure of your form.

    Good luck

    Bruce

  • Generation of the table of all values of 30 at a time

    Hey, I measure all 30 temperature both values and generate the table of values of 30

    every minute...

    How to extract a 30 value at the same time and at the same time! I'm a problem inside!

    Here is a version with simpler data structures. Maybe this can give you some ideas.

  • Display several values on the front using the table

    For example, if I enter "10" for number of datapoints, I want to see 10 hexadecimal and binary all values in a column. At present, only 1 value appears and erasing all of the previous values

    Thank you!

    You do not use a shift register to store the values in the table between the fo the loop iterations For.

    It is a fundamental concept of LabVIEW.

    I recommend you watch the LabVIEW tutorials online
    LabVIEW Introduction course - 3 hours
    LabVIEW Introduction course - 6 hours

  • Going crazy on the values of stale table f *.

    Some seriouse need help now.

    My goal is to build a table whenever a real touch.

    1. create a table based on the values programitlitly beeing past in the table

    2. This should each time when a Boolean value is true.

    3. the table building function should wait 6 s before storing in the table when the value is true

    My problem is that when I press True, and I start changing the starting value (say 0) desired value I want that it either (say 5) before six seconds pass, the value passed to the table after 6 seconds is the starting value of 0 not the value of dessired 5. This value appears the next time that I push the real button.

    It drives me crazy

    And the desired value must come within a structure of sequence because of the structure of the main VI (this is just an excerpt of this cose)

    HELP Please!

    Probably, this should solve your problem.

  • How to convert a single scalar value in a table for the graphics path

    I try to establish a curve of output power of power factor vs. But my power factor shows a single scalar value (DBL) and power output is table 1 d of scalars. suggest me a way to trace "output power (Pout) vs power factor".

    It will be a really boring plot (a single line with any power factor you have), but you can use the table to initialize with the size of the switchboard.

  • How to find the value closest in the table?

    Hi all

    I just want to find the value closest from the string table. That I joined herer as an image.

    Now, if I want to find the value of 350 of the string table and that's not in the table in the output array there should be more close 350 display value...

    Thank you for the support

    Vinal Gandhi

    Hi G Vinal,

    something like the joint comes to my mind.

    It may be useful

    Mike

  • To build the waveform.vi function how to calculate the value of dt

    Dear all

    Please guide me How to calculate the value of dt according to waveform.vi of construction

    My sampling rate is 25000 and I take 200000 samples.

    Kind regards

    Muhammad Irfan

    It's all simple arithmetic. The inverse of the sampling frequency power of samples is then the dt or the time between samples the number of samples is not relevant.

Maybe you are looking for

  • RAM upgrade problem

    Upgrading memory for the chips of 4x4g on the iMac 21.5 inch late 2009. Chips inserted but when he repowered a few beeps and does nothing else. Suggestion?

  • Firefox provides an e-mail address?

    Please explain the electronic procedures for firefox. and advise whether firefox provides e-mail addresses and how much.

  • NB200-10Z - how to restore factory settings?

    Hello I seem to have a pretty annoying problem with the NB200 - 10Z.The operating system is WinXP SP3. I was looking to restore it to its factory settings by using the tools of Toshiba, pressing F8 during the boot sequence, this however does not take

  • How to see if a web site is secure

    with internet explorer and installed avast, avast alerted with our site, Firefox does not work, or I don't know how to access this information.

  • Fritz! USB card V 2.1

    Hallo, ich habe eine nigelnagelneue SSD-Platte bekommen und mich like, is Windows 7 Pro neu zu installieren. Alles quick before. Shows email ich zum Administrieren von ISDN-rout uber Lancom-Config meine loved AVM Fritz! Card USB 2.1. Sharp hat bisher