How to sum values from multiple lines in a DataTable?

I have a Lookout program which uses a DataTable to allow users to write basic programs (relay on/off times, which relays change state, and pause times).  The DataTable cursor position changes to advance from one program stage to another.  
What I would like to do is sum up the times from all the various stages.  Can anyone suggest how I might iterate through the DataTable using Lookout alone?  
Thanks,
Dave 

I have tried to make 'loops' similar to that one but Lookout shows a message that iterations or loops for a variable are not allowed.
You can use a sequencer but there are 2 inconvenients:
1.- For a fast computer every step of the sequencer cannot be faster than 0.1 - 0.2 seconds. If you have many iteraciones, it will take some time.
2.- The sequencer object has a maximimum of 100 steps.
Ryan S. Here are questions for you:
1.- Is there a way to add in the lks file statements and or functions using existing variables? What can be done and what not?
2.- Is there a way to insert comments in the lks file?
Thanks in advance.
Rudy Lopez

Similar Messages

  • How to assign values from multiple output(cursor) to fields(line item-one below other) in forms??

    Hi all,
    I have a Form which has text_field columns as below , created from table RECEIVED_FORM_15G. This table is blank.
    1)     CUST_CODE with 1 line item. (Number of Items displayed=1)
    2)     ACCT_FD_NO with 10 line items. (Number of Items displayed=10)
    There are more than 1 ACCT_FD_NO for 1 CUST_CODE.
    When i enter the CUST_CODE and press tab, all the values of ACCT_FD_NO must get displayed. I am taking ACCT_FD_NO values from another table called KEC_FDACCT_MSTR
    and want to display ACCT_FD_NO, one below other (line item). So i put in the following code:
      BEGIN
           FIRST_RECORD;
           FOR CUR_R IN (SELECT  ACCT_FD_NO FROM KEC_FDACCT_MSTR WHERE   STAUS='E' AND ACCT_CUST_CODE=:CUST_CODE)
           LOOP
               NEXT_RECORD;
              :ACCT_FD_NO :=CUR_R.ACCT_FD_NO;
           END LOOP;
        END;
    But the problem is i'm not able to display the captured value in next consecutive line items.
    It is getting displayed in first & second line item only.
    The first value gets displayed in first line item, then the cursor moves from first line item to second line item,
    the second value gets displayed in the second line item, (this is because of NEXT_RECORD in my code)
    later all the values are getting displayed in the second line item only. (I checked it using message call.)
    I want it to display one below the other.
    The problem is the cursor is not moving to third line item after the second line item.
    So the remaining values gets displayed in the second line item only.
    So what is wrong in my code??
    Where should i place the next_record to make the cursor move from one line item to next line item i.e from second line item to third line item
    & third line item to fourth line item & so on....  Please let me know.
    Thank You.
    Oracle Forms Builder 6i
    Oracle 9i.

    The above code is right..
    The only mistake was In the property palette of CUST_CODE, "required" was not set to "Yes" .
    So after setting required to 'YES' , it worked perfectly fine.

  • How to sum value from a day to next day

    First, I provided the CREATE and INSERT sql statements for testing:
    CREATE TABLE TBL_CALC
        "YEAR"  VARCHAR2(4),
        "MONTH" VARCHAR2(2),
        "DAY"   VARCHAR2(2),
        "HOUR"  VARCHAR2(2),
        "VALUE" VARCHAR2(20)
    insert into tbl_calc (year,month,day,hour,value) values ('2000','1','1','20','32')
    insert into tbl_calc (year,month,day,hour,value) values ('2000','1','1','21','33');
    insert into tbl_calc (year,month,day,hour,value) values ('2000','1','1','22','53');
    insert into tbl_calc (year,month,day,hour,value) values ('2000','1','1','23','28');
    insert into tbl_calc (year,month,day,hour,value) values ('2000','1','2','0','37');
    insert into tbl_calc (year,month,day,hour,value) values ('2000','1','2','1','35');
    insert into tbl_calc (year,month,day,hour,value) values ('2000','1','2','2','39');
    insert into tbl_calc (year,month,day,hour,value) values ('2000','1','2','3','57');
    insert into tbl_calc (year,month,day,hour,value) values ('2000','1','2','13','42');
    insert into tbl_calc (year,month,day,hour,value) values ('2000','1','2','14','12');
    insert into tbl_calc (year,month,day,hour,value) values ('2000','1','31','21','32');
    insert into tbl_calc (year,month,day,hour,value) values ('2000','1','31','22','52');
    insert into tbl_calc (year,month,day,hour,value) values ('2000','1','31','23','29');
    insert into tbl_calc (year,month,day,hour,value) values ('2000','2','1','0','27');
    insert into tbl_calc (year,month,day,hour,value) values ('2000','2','1','1','45');
    insert into tbl_calc (year,month,day,hour,value) values ('2000','2','1','2','69');
    insert into tbl_calc (year,month,day,hour,value) values ('2000','2','1','3','68');I have this sql to get the period of time of a day:
             select year,month,day,hr,val,
                     sum(case when hr between 20 and 23 or hr between 0 and 3 then val else 0 end) over (partition by year,month,day) as new_value
                          from(
                                 select year,month,day,to_number(hour) hr,to_number(value) val from tbl_calc
             order by year,month,day,hrHere's the output:
    YEAR MONTH DAY HR VAL NEW_VALUE
    2000 1     1   20  32       146
    2000 1     1   21  33       146
    2000 1     1   22  53       146
    2000 1     1   23  28       146
    2000 1     2    0  37       168
    2000 1     2    1  35       168
    2000 1     2    2  39       168
    2000 1     2    3  57       168
    2000 1     2   13  42       168
    2000 1     2   14  12       168
    2000 1     31  21  32       113
    2000 1     31  22  52       113
    2000 1     31  23  29       113
    2000 2     1    0  27       209
    2000 2     1    1  45       209
    2000 2     1    2  69       209
    2000 2     1    3  68       209
    17 rows selected The above sql get the sum of time period which in 20-23 and 0-3 in every day.
    The values are recorded by each hour. (sometimes there are missed hours)
    My problem is how to get the sum of time period over each day?
    For example, I need to get the sum of value of a day night time from 20-23 and the next day morning 0-3, to become a sum value in this period.
    Let say, the sum from 1st Jan night time to 2nd Jan morning should be combined into 1 value (146+168)=314.
    In addition, there is a tricky point is that from every month last day (31th Jan night time to 1st Feb morning time) are also need to be combined into 1 value.
    And it appears the new problem is that how about if the last day is in a non-regular day (not 30,31,28,29), just say maybe March consist only 15 period records only and the last day is 19th March.
    The expected output:
    YEAR MONTH DAY HR VAL NEW_VALUE
    2000 1     1   20  32       314
    2000 1     1   21  33       314
    2000 1     1   22  53       314
    2000 1     1   23  28       314
    2000 1     2    0  37       314
    2000 1     2    1  35       314
    2000 1     2    2  39       314
    2000 1     2    3  57       314
    2000 1     2   13  42       314
    2000 1     2   14  12       314
    2000 1     31  21  32       322
    2000 1     31  22  52       322
    2000 1     31  23  29       322
    2000 2     1    0  27       322
    2000 2     1    1  45       322
    2000 2     1    2  69       322
    2000 2     1    3  68       322
    17 rows selected I think its quite complicated case, please ask me for more if you need to clarify for something.
    Thanks so much!! :)
    Edited by: 920575 on 2012/7/31 上午 1:09

    Are you looking for something like this (partially tested)...
    SQL> ed
    Wrote file afiedt.buf
      1  select year
      2        ,month
      3        ,day
      4        ,hr
      5        ,val
      6        ,sum(case when hr between 20 and 23 or hr between 0 and 3 then val else 0 end) over (partition by year,month,day) as new_value
      7        ,sum(case when hr between 20 and 23 or hr between 0 and 3 then val else 0 end) over (partition by trunc(dt-(4/24),'DD')) as day_value
      8  from(
      9       select year,month,day,to_number(hour) hr,to_number(value) val
    10             ,to_date(year||lpad(month,2,'0')||lpad(day,2,'0')||lpad(hour,2,'0')||'0000','YYYYMMDDHH24MISS') as dt
    11       from tbl_calc
    12      )
    13* order by year,month,day,hr
    SQL> /
    YEAR MO DA         HR        VAL  NEW_VALUE  DAY_VALUE
    2000 1  1          20         32        146        314
    2000 1  1          21         33        146        314
    2000 1  1          22         53        146        314
    2000 1  1          23         28        146        314
    2000 1  2           0         37        168        314
    2000 1  2           1         35        168        314
    2000 1  2           2         39        168        314
    2000 1  2           3         57        168        314
    2000 1  2          13         42        168          0
    2000 1  2          14         12        168          0
    2000 1  31         21         32        113        322
    2000 1  31         22         52        113        322
    2000 1  31         23         29        113        322
    2000 2  1           0         27        209        322
    2000 2  1           1         45        209        322
    2000 2  1           2         69        209        322
    2000 2  1           3         68        209        322
    17 rows selected.This turns the values into a proper DATE datatype and then offsets that back by 4 hours to bring the 0-3 hours into the previous day, and then partitions the sum based on that day.

  • How To Concatenate Column Values from Multiple Rows into a Single Column?

    How do I create a SQL query that will concatenate column values from multiple rows into a single column?
    Last First Code
    Lesand Danny 1
    Lesand Danny 2
    Lesand Danny 3
    Benedi Eric 7
    Benedi Eric 14
    Result should look like:
    Last First Codes
    Lesand Danny 1,2,3
    Benedi Eric 7,14
    Thanks,
    David Johnson

    Starting with Oracle 9i
    select last, first, substr(max(sys_connect_by_path(code,',')),2) codes
    from
    (select last, first, code, row_number() over(partition by last, first order by code) rn
    from a)
    connect by last = prior last and first = prior first and prior rn = rn -1
    start with rn = 1
    group by last, first
    LAST       FIRST      CODES                                                                                                                                                                                                  
    Lesand         Danny          1,2,3
    Benedi         Eric           7,14Regards
    Dmytro

  • How to get one value from multiple duplication for a key figure field

    Hi expert,
          I have a infoprovider, with following format:
            employee     hourly_rate   action_type  count of action
         there are multiple rows for each employee, I want to create query as follows:
            employee     hourly_rate   action_type  count of action
         in which hourly_rate is constant , only retriving one value from multiple rows for one employee, count of action should be summarized. 
    how to get this hourly_rate.
    Many Thanks,

    Hi,
    put the employee in rows panel -> reaming object put it in free char panel.
    suppress the all result rows for the all object except employee .
    select the object -> go to query properties -> select display tab -> select result rows -> select suppress.
    select the employee -> go to query properties -> select display tab -> select result rows -> select always display. - now it will give employee wise hourly rate summarize data.
    Thanks,
    Phani.

  • Retrieve Title field values from multiple lists and add into another list

    Hi , Iam trying to retrieve Title field value from multiple lists. and add them into another list. using Javascript. Can any one help me in doing this. Below is the code.. function save() { clientContext = new SP.ClientContext.get_current(); oWebsite = clientContext.get_web(); oList = clientContext.get_web().get_lists().getByTitle('MainList'); clientContext.load(oList); clientContext.executeQueryAsync(OnSucceeded, onQueryFailed); } function GetListItemValue(listName, fieldName) { var list = oWebsite.get_lists().getByTitle(listName); var eventValue = document.getElementById(fieldName).value; eventValue = eventValue.replace(",", ""); var camlQuery = new SP.CamlQuery(); var filterdata = '<view><query><where><eq><fieldref name="Title/"><value type="Text">' + myreqValue.trim() + '</value></fieldref></eq></where></query></view>'; camlQuery.set_viewXml(filterdata); listItems = list.getItems(camlQuery); clientContext.load(list); clientContext.load(listItems, 'Include(Id)'); clientContext.executeQueryAsync(Succeeded,Failed); } function OnSucceeded() { itemCreateInfo = new SP.ListItemCreationInformation(); oListItem = oList.addItem(itemCreateInfo); oListItem.set_item('Title', 'My New Title'); var deptItemLookupField = new SP.FieldLookupValue(); //Problem in below line...I was unable to get ID var getId = GetListItemValue("Listname1", "txtboxname1"); alert("ID" + getId); if (getId != undefined) { deptItemLookupField.set_lookupId(getId); } var getId12 = GetListItemValue("Listname12", "txtboxname12"); alert("ID" + getId12); if (getId12 != undefined) { deptItemLookupField.set_lookupId(getId12); } oListItem.update(); clientContext.executeQueryAsync(itemadded, itemFailed); } function itemadded() { alert('Item added successfully'); } function itemFailed(sender, args) { alert('Item added itemFailed' + args.get_message() + '\n' + args.get_stackTrace()); }
    Raj

    Hi,
    For this requirement, you will need to retrieve all the lists objects you want firstly, then execute the requests one by one to get the value of the Title column using CAML or
    LINQ.
    How to: Retrieve Lists Using JavaScript
    http://msdn.microsoft.com/en-us/library/office/hh185009(v=office.14).aspx
    About
    retrieve list items:
    http://msdn.microsoft.com/en-us/library/office/hh185007(v=office.14).aspx
    You can use
    Promise in your script to make your requests sequentially:
    http://www.shillier.com/archive/2013/03/04/using-promises-with-the-javascript-client-object-model-in-sharepoint-2013.aspx
    http://www.learningsharepoint.com/2013/08/13/using-deferred-and-promise-to-handle-async-calls-in-sharepoint-client-object-model/
    Best regards
    Patrick Liang
    TechNet Community Support

  • Using ME57 to create an RFQ from multiple lines on multiple PRs

    When using ME57 to create RFQs how can I select multiple line items from multiple purchase requisitions to turn into a single RFQ. If I select multiple lines and then use 'RFQ with Vendor', it only selects one line item.  After further research it appears that you can only create only line at a time (very time consuming). 
    If you use ME41 and create with reference to PR then you can not sort or filter columns to allow for easy consolidation.
    Another forum recommended the following when using ME57 which works but it again adds extra steps to the process.
         The whole process is as follows -
         1) When you are in the 'Assign and Process Purchase Requisition' screen, select related PR and then click on 'Without Vendor' icon to flag all PRs for RFQ processing.
         2) Select these PRs again and click further on 'Assignment Overview' icon (Shift and F5). The next screen will appear - Assign and Process requisitions - Overview of Assignments screen.
         3) Select the 'PReq' column and then click further on 'Process Assignment' icon (F2). The next screen will appear where you have to maintain the 'quotation deadline' information.
         4) Then click on 'Continue' icon (enter).
    [http://www.sapfans.com/forums/viewtopic.php?f=6&t=198768]
    So is there any way to either 1) enable sorting of data in ME41 or 2) use ME57 to create one RFQ from multiple line items of multiple purchase requisitions when selecting 'RFQ with Vendor'.

    What is the JPEG specs? What are the specs of the project you're working in?

  • How to pickup files from multiple directories

    Hi all,
    How to pickup files from multiple directories and send it to two different folders at target
    Ex:
    files\xi\us\US.txt
    files\xi\uk\UK.txt
    i need to pick up the above mentioned two files and send it to the following paths
    app1\files\us\download\US.txt
    app1\files\uk\download\UK.txt
    US.txt has to goto US folder and UK.txt has to goto UK folder only
    Regards

    Hi,
    To pick form multiple folders, select Advanced Mode for file selection in file adapter..
    there u can specify directory name/file names
    Refer
    /people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter
    To put those files at multiple folders write a command line arguments for this.. go through this weblog...
    /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    XI/PI: Command line sample functions
    /people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions
    Hope this will help you....
    Regds,
    Pinangshuk.

  • How to read values from DMM4040

    Hi,
       I am using DMM4040, NI PXI 6509 device.
    I need to make some port pins high which i have already done and now i have to read value captured by DMM then i have to make my port pins low if my value is within limits.
    Can u suggest me how to read values from DMM and then by notification i ll make my port pins low.
    '' A professional is someone who can do his best work when he doesn't feel like it''...........

    What language are you using?  If using LabVIEW, you use the NI-DMM API to communicate with the 4040.  Just take your reading, do your limit comparison, and set your lines based on the comparison results.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to clean project from comman line ?

    How to clean project from comman line ?
    I would like to invoke the same functionality as in Flex
    Builder Project -> clean... -> clean all projects...
    but from command line is it possible ?

    You can:
    1) Perform a project clean up (p.153 of the user manual) - it removes any unused recordings, samples and other files
    2) Consolidate project (p. 154 of manual) - this copies all the used audio material into the project folder and also deletes any empty folders within project folder, making it easier to navigate
    3) Save project as a copy - this creates another project folder, but without all the backups and other additional files

  • How to retrieve value from xml file

    hi all,
    can somebody pls tell me how to retrieve value from xml file using SAXParser.
    I want to retrieve value of only one tag and have to perform some validation with that value.
    it's urgent .
    pls help me out
    thnx in adv.
    ritu

    hi shanu,
    the pbm is solved, now i m able to access XXX no. in action class & i m able to validate it. The only thing which i want to know is it ok to declare static ArrayList as i have done in this code. i mean will it affect the performance or functionality of the system.
    pls have a look at the following code snippet.
    public class XMLValidator {
    static ArrayList strXXX = new ArrayList();
    public void validate(){
    factory.setValidating(true);
    parser = factory.newSAXParser();
    //all factory code is here only
    parser.parse(xmlURI, new XMLErrorHandler());     
    public void setXXX(String pstrXXX){          
    strUpn.add(pstrXXX);
    public ArrayList getXXX(){
    return strXXX;
    class XMLErrorHandler extends DefaultHandler {
    String tagName = "";
    String tagValue = "";
    String applicationRefNo = "";
    String XXXValue ="";
    String XXXNo = "";          
    XMLValidator objXmlValidator = new XMLValidator();
    public void startElement(String uri, String name, String qName, Attributes atts) {
    tagName = qName;
    public void characters(char ch[], int start, int length) {
    if ("Reference".equals(tagName)) {
    tagValue = new String(ch, start, length).trim();
    if (tagValue.length() > 0) {
    RefNo = new String(ch, start, length);
    if ("XXX".equals(tagName)) {
    XXXValue = new String(ch, start, length).trim();
    if (XXXValue.length() > 0) {
    XXXNo = new String(ch, start, length);
    public void endElement(String uri, String localName, String qName) throws SAXException {                    
    if(qName.equalsIgnoreCase("XXX")) {     
    objXmlValidator.setXXX(XXXNo);
    thnx & Regards,
    ritu

  • Adding Sum Totals from Multiple Tables in A single Document

    Hello All,
    I'm having trouble adding sum totals from multiple tables I've created in a Pages 09 doc. I putting together a spreadsheet for cost projections for a house remodel. I created tables for each room of the house. At the bottom of the document I'd like to have another table that takes the totals from each individual room and adds them up. Problem appears to be that each table has the same x/y axis labels so row and column numbers/letters are repeated so the final table can't quantify thing correctly.
    Any easy solutions? I can't find anything that's helped in my search efforts.
    Thanks,
    Josefis

    Jerry,
    Thanks for the feedback. I thought that might be the case. And you were correct to assume I was more comfortable in Pages. I'm halfway through converting everything to numbers. In the end it will work great too. Just some different formatting/design choices to be made as numbers doesn't appear to be as versatile in the same way pages is with design. So far it looks pretty good though.
    Thanks again,
    Josefis

  • How to get value from list item

    Hi all,
    How to get value from list item?
    I have a problem with the List Item object
    in the Oracle forms.
    How can I retrieve the selected item from
    a list ?
    I didn't find any function like 'list.GET_
    SELECTED_ITEM()'...
    thanks
    Bala

    Hello,
    You get the value as for any other Forms item:
    :value := :block.list_tem ;Francois

  • How to move value from one tlist to another tlist in same form?

    how to move value from one tlist to another tlist in same form on button press?
    Same like in data block wizard when we select value from 1st list it will go to 2nd list and can be move back. Please help i am new to forms .
    Regards

    just call the following proc in your add & add all buttons. Reverse the code for REMOVEs
    this proc will move one item at a time from list_item1 to list_item2.
    PROCEDURE add_an_item
    IS
      v_list_count    NUMBER;
      v_item1_label  VARCHAR2(60);
    BEGIN
      IF :list_item1 IS NOT NULL THEN v_list_count := nvl(Get_List_Element_Count('list_item1'),0);
          IF v_list_count >= 1 THEN FOR i IN 1..v_list_count
          LOOP
             IF   :list_item1    = Get_List_Element_Value('list_item1', i)
             THEN
                  v_item1_label := Get_List_Element_label('list_item1', i);                 
                  Add_List_Element('list_item2',1,v_item_label,:list_item1);         
               Delete_List_Element('list_item1',i);
               Exit;
             END IF;
          END LOOP;
           END IF;
       END IF;
    END;
    *********************************************************************************this proc will move all items from list_item1 to list_item2.
    PROCEDURE add_all_items
    IS
      v_list_count NUMBER;
      v_item_label VARCHAR2(60);
      v_item_value VARCHAR2(60);
    BEGIN
    v_list_count := nvl(Get_List_Element_Count('list_item1'),0);
    IF    v_list_count = 1 AND Get_List_Element_Value('list_item1', 1) IS NULL THEN NULL;
    ELSIF v_list_count >= 1 THEN
           FOR i IN 1..v_list_count
           LOOP
            v_item_value  := Get_List_Element_Value('list_item1', i);
            v_item_label  := Get_List_Element_label('list_item1', i);       
            Add_List_Element('list_item2',i,v_item_label,v_item_value);
           END LOOP;
           clear_list('list_item1');
    END IF;
    END;I added [ code ] tags to make this easier to read.
    Message was edited by:
    Jan Carlin

  • How do I select from multiple schema's

    How do I select from multiple schema's
    Tried:
    SELECT * FROM schema1.table1, schema2.table2
    WHERE schema1.table1.column1 = schema2.table2.column2;
    Errored......

    Thanks
    We finally got in touch with our DBA and he said the same thing.
    SELECT t1.*,
    t2.*
    FROM schema1.table1 t1,
    schema2.table2 t2
    WHERE t1.column1 = t2.column2;
    I'll try it afther I finish a task my boss just gave me.
    BRB then.

Maybe you are looking for

  • Error Message after updating Windows XP on the Microsoft Update site

    I have just taken delivery of a Satellite Pro A120 and updated the windows XP components on the Microsoft Update site, when the system rebooted to make the changes it developed an error message during the final stages of the bootup relating to the Re

  • Mac Pro 2006 - Adding Wireless card

    Hi everyone I have a 2006 Mac Pro running Mac OSX 10.6 Snow Leopard. Back when I ordered the system, I chose Bluetooth but not WiFi Now I'm trying to add wireless to my Mac Pro, what are my options? Where can I find a wireless for my Mac Pro? Thank y

  • Exceptional aggregation.

    Hi Experts I have made exceptional aggregation to KF 0DEB_CRE_LC with 0FISCPER. But in query run time it is saying to do establish Fiscal year variant to that Key figure. This settings whare I have to do. Please help me in details. Thanks in Advance,

  • BEA-010065 : fuego.lang.CheckFailed: Ensurement failed exception

    Hi, We are using oracle BPM 10.3.1 in our application. WE deployed the BPM process process into enterprise and working fine. Since 3 days we are getting below exception continously in weblogic server. Can you please help me. Thank you. <Jul 21, 2010

  • Enterprise Support - Populating my SM7 using SMSY_SETUP

    Hello all, my first post - be gentle! We are currently setting up our Solution Manager 7 system for Enterprise Support as we are a VAR (Value added Re-seller) We are using the documentation: "Configuration Service-Desk for VAR" When running the SMSY_