Calling A Single Value From A Channel To Output To A Table Need Help

I have populated a table that contains every value in every channel of my data set. I am now attempting to do channel calculations in order to come up with weighted averages and an overall average for the days worth of test. This data will be outputted to a new table called 'Total Table'. This Total Table is to only have one value per channel.
The issue I am running into is 2-fold. When doing channel arithmetic, primarily Channel Sums using 'ChnSum' DIAdem does not truncate the entire data set into a new data set. It retains all the values and appends the last block with the sum of the entire channel set. I need to either be able to pull that last value dynamically (as not all my data sets are of equal length) or I need to generate a new channel that only has the sum value. Is there a way to do this?
Here is what I have been attempting to do but to little avail. Attached is a screenshot of what the table output looks like after this code is processed.
'Populate Total Table With Values From Above Calculations
For j = 1 to selectData.MultiSelection.Count
Counter = Counter + 1
length = ChnPropValGet("[" & selectData.MultiSelection(j).Index & "]/Cumulative Fuel Used", "Length")
    If Counter = 2 Then
   [ A Bunch Of Channel Calculations That Output New Channels ]
   Call View.Sheets("Total Table").Areas("Area : " & Counter).DisplayObj.Columns.Add(ChnFind("Ch("& selectData.MultiSelection(j).Index &") > 0 " , length - 1))
  End If
Next
Any help would be much appreciated.
Thanks,
~Nate
Solved!
Go to Solution.
Attachments:
TotalTable.JPG ‏212 KB

This is my latest version of the code and it sort of works but its referencing my "Fan Speed" channel for some reason rather than my "Cumulative Fuel Used" channel. Im a little stumped
For j = 1 to selectData.MultiSelection.Count
Counter = Counter + 1
length = ChnPropValGet("[" & selectData.MultiSelection(j).Index & "]/**bleep** Fuel Used", "length")
If Counter = 2 Then
Call View.Sheets("Total Table").Areas("Area : " & Counter).DisplayObj.Columns.Add(Data.Root.ChannelGroups("[" & selectData.MultiSelection(j).Index & "]").Channels("**bleep** Fuel Used").Values(length))
End If
Thanks,
~Nate

Similar Messages

  • How do I get my previous contacts from mobileme now to the icloud? I need help figuring out how to make that transition?

    How do I get my previous contacts from mobileme now to the icloud? I need help figuring out how to make that transition?

    Try using the app My Contacts Backup, which will back up your contacts as an attachment to an email.  Send this email to yourself, open it on your Mac and double-click the attachment to import them to Address Book (or Contacts if you have Mountain Lion).

  • Passing multiple single values from R/3 BAPI to BW Query in VC

    Hi Experts
    I have a VC model where I am calling an R/3 BAPI which is returning a table of customer accounts.  I'm trying to go directly from that BAPI to a BW Query and pass the table of accounts into the BW Query.
    The BW Query has been set up with a variable to accept multiple single values for accounts, and I have mapped the correct output field from the BAPI to the correct input field on the Query.
    The BAPI does not seem to be passing the table of accounts into the Query.   If I hard code a single account in the mapping of the BAPI to Query call, the Query successfully returns the data I expect.
    Can I pass a table of accounts to a BW Query in this way?
    Many Thanks
    Tom

    Hi
    Have you tried with 'Group & Combine' operator. Just add this operator & join your BAPI & BI Query to this. Then in ths configure of this oparator select the 'Accoount' field & gourp the data accordingly. Also specify the aggregation if required. & in the table/chart after the operator select the fields which you want to show.
    I hope this is what you are looking for.
    Regards
    Sandeep

  • Data storage, add name to single value of a channel

    Good day to all.
    In my application i use data storage VI's to enable data collecting abilities. I have multiple test wich i have to run on a board, every single test give an integer value as output. I use a TDM file where i put all the value, coming from different board, in a single channel. Channel are already divided in group wich represent the type of the board were i run the test (part number). All the board have a serial number. Later, when i need to review the collected data, i need to know the value given by a single board, identify by it's serial number. So i need to add an identificator, maybe the serial number, to the value i store in the TDM file. How can i do this?
    Thank you, Francesco.

    A string can't be channel data.  So what you might have to do is make the serial number a metadata name and the value of that metadata the index of that serial number.
    To be honest, I don't think TDMS is the right format for your data.  TDMS is great for waveforms.  But single data points, not so much.  What you really need is a database.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Getting a single value from an array collection

    I have an array collection that was created from an XML file
    through the HTTP Service. One of the nodes in the XML file was
    product_number and I can display all of the items in this node in a
    datagrid so I know the array has the name of the node in it.
    I would like to be able to retrieve a single item from the
    array collection (e.g. a product_number = to xxx) and assign it to
    a variable.
    I would also like to be able to assign all the items in a
    particlur column (e.g. all product_numbers) to separate variables
    at the same time.
    Any help would be greatly appreciated.

    You can apply a filterFunction.
    Or you can do it the brute force way: loop over the elements,
    and test for the value you want.
    As far as putting values into variables, I am not sure what
    you want.
    And this is not a Flex Builder question and should go in the
    General Discussion forum.
    Tracy

  • Passing Multiple Single Values from Sender Query to Receiver Query in RRI

    Dear All.
    We have 2 - Bex Reports ZBEX_1 & ZBEX_2
    1. In ZBEX_1 having the fileds data like the below.
    Account Doc. Number - Clearing Document --- Amount
    12345                  -  65432                --- 100
    12346                  -  54321               ---  50
    2. In ZBEX_2 having the following data.
    Account Doc.Number -- Amount
    45342                     - 10
    66666                        -  100
    65432                       -   10
    54321                      - 5
    3. I am Traying to create RRI Between ZBEX_1 & ZBEX_2 , with Sender query as ZBEX_1 and Receiver query as ZBEX_2
    If I drilldown from ZBEX_1 need to show the following output in the ZBEX_2
    Account Doc. Number  -  Amount
    65432                       -     10
    54321                      -     5
    i.e If Clearing Documnet in the ZBEX_1 is same as Account Doc. Number in ZBEX_2 those Account Doc. Numbers I have to show in the output of ZBEX_2 RRI Report.
    Both the records I have to show at a time.
    So please suggest me
    1. How to pass Multiple Single Values to Next Query using RRI
    2. How to Map Clearing Document to Account Doc. Number in RRI.
    NOTE: Account Doc. Num length is same as Clearing Document
    Please suggest me.
    Thanks & Regards,
    Kiran Manyam

    Your scenario of passing values from multiple records in Source does not suit well for RRI Jumps.
    In ZBEX_2 query, create a Replacement path variable on Clearing Document. In that Replacement path variable, use the Replacement with query option and choose the ZBEX_1 as the underlying query source.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/bd/589b3c494d8e15e10000000a114084/frameset.htm
    When you execute ZBEX_2, what ever clearing document values that ZBEX_1 has will be passed through the replacement path variable as a filter to the ZBEX_2
    Hope it helps!
    Uday Pothireddy

  • I am wanting to exactly match two ID numbers from two differing worksheets within one work book. Once matched I am wanting to retrieve a row value from the second worksheet into the first. Any help much appreciated.

    I am wanting to exactly match two ID numbers from two worksheets within the one work book. ID numbers are non linear. Once exactly matched I wish to retrieve a corresponding row value from worksheet two and have it appear in worksheet one against the correct ID number. I have been looking at IF, VLOOKUP, and MATCH functions and suspect that what I want to do requires a combination of two or more. Any help will be greatly appreciated.
    regards Vaughanh

    Vaughan,
    Data A:D is all cells start at column A thru column D.
    There is built-in help using the menu item "View > Show Function Browser"  in the search field (top right) you can enter vlookup and you will see the detailed description.
    From this we see:
    VLOOKUP
    (search-for, columns-range, return-column, close-match)
    search-for:  The value to find. search-value can contain any value type.
    columns-range:  A range of cells. range is a reference to a single range of cells, which may contain values of any type.
    return-column:  A number that specifies the relative column number of the cell from which to return the value. return-column is a number value. The leftmost column in the range is column 1.
    close-match:  An optional value that determines whether an exact match is required.
    close match (TRUE, 1, or omitted):  If there’s no exact match, select the column with the largest top-row value that is less than the search value. Wildcards can’t be used in search-for.
    exact match (FALSE or 0):  If there’s no exact match, return an error. Wildcards can be used in search-for.
    So... the 2,0 means return the value form the same row as the lookup value but from the 2nd column of the range.  3, 0 means from the 3rd column.  the ", 0" means exact match

  • Get value from input text in read only adf table

    all,
    i added a column to an adf read-only table and inserted an input text control in the extra column. how do i loop through the table to get the value from the input field?
    paul

    Hi,
    can you be more clear on the usecase? Its a read only table that you added a input text field in a new column. What is the column based on and what is the goal of looping through ?
    Frank

  • How to Pass values from XML to JSP??? Urgent Please Help me

    Hi guys,
    I am new to XML, I want to pass values from XML to JSP. I have a xml file with attributes, I should send this values to a JSP file. How is it??? Please Help guys.... its very urgent. Please send me how to do it with an example or atleast any urls related that....
    Looking for ur favourable reply.
    Thanks in advance,
    Sridhar

    in a servlet :
    parse your xml file (see how at the end of the post) and
    put the values you want in the request attributes
    request.setAttribute("value1", value1);
    ...redirect to the jsp
    in the JSP:
    get the wanted attributes:
    String value1=(String)request.getAttribute("value1");To learn how to parse a xml file, pay a look at this page, it explains how to read the XML document to build an object representation, and then how to navigate through this object to get the data
    http://labe.felk.cvut.cz/~xfaigl/mep/xml/java-xml.htm

  • Retrieving a single value from sql:query

    Hi all, pretty new to jsp and tag libraries so appoligies if this isn't the correct forum or my question is a bit lame...
    I've got a basic input form written in JSP and i'm trying to use AJAX to return a customers name when they input there customer IS. My AJAX interaction works ok and so far i have got it to return a string value to indicate if the customer ID is valid or invalid.
    However, now i want to return the customers name based on a SELECT SQL statement. My sql works ok but i can't figure out how to return / access the single cname field that is returned. ALL the <sql:query> examples that i have seen use a <c:forEach> loop but this doesn't seem to work for me.
    My AJAX / Jsp code looks like this:
    <%@ page contentType="text/html" info="Customer Id Lookup" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
    <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
    <sql:setDataSource scope="application"
       driver="com.mysql.jdbc.Driver"
       url="jdbc:mysql://localhost:3306/dbawp"
       user="*******"
       password="********"
    />
    <sql:query var="qryValidCustomer" >
        SELECT cname FROM camper WHERE cid = ?;
        <sql:param value="${param.data}"/>
    </sql:query>
    <c:choose>
    <c:when test="${qryValidCustomer.rowCount == 0}">
    unknown camper
    </c:when>
    <c:otherwise>
    <c:forEach items="${qryValidCustomer.row}" var="row">
    ${fn:escapeXml(row.cname)}                                                         <- Doesn't seem to work - i get nothing returned
    </c:forEach>
    <%--good camper--%>
    </c:otherwise>   
    </c:choose>Can anyone point me in the right direction?
    Manythanks in advance,
    Sam

    > my db fields contain a list of sections, " 1,2,3,4,"
    When you find yourself storing delimited lists in a field,
    that's a sign that you should
    normalize
    your data. Storing lists is difficult to query, error prone and bad
    for performance.
    A separate table should be used to represent a many-to-many
    relationship.
    Table - Columns
    Advertisement - AdvertisementID, AdvertisementDescription,
    ...other columns
    Type - TypeID, TypeTitle, ...
    AdvertisementType - AdvertisementID, TypeID
    Instead of storing the related types as a list
    AdvertisementID | TypeID
    1 | 1,2,3,4
    Store them as separate records in the 3rd table
    AdvertisementID, TypeID
    1, 1 (ad # 1, type # 1)
    1, 2 (ad # 1, type # 2)
    1, 3 (ad # 1, type # 3)
    1, 4 (ad # 1, type # 4)

  • Setting a variable that I can call it's value from any symbol.

    Hey everyone!
    I'm working on an edge animate game and I'm learning as I go you can say
    The way I have it set up is I have a container that holds different symbols depending on which button you click on. They symbols open you up to a deeper part of the game.
    However I want to be able to set a variable on the stage that I can later manipulate when the different symbols are open.
    What I have so far is my limited understaning of jquery, in the stage I start off by setting a variable
    var variable1 =     5,
        variable2 =     10;
    Then in my symbol I want to be able to do something like this
    if(variable1 > variable2) {
    Then do something
    else {
    Then do something else
    variable1 = 10
    variable2 = 5
    However the problem I am having is that when I set the variable value in the stage the entire variable name and value is not rememembered in the symbols.
    So is there any code I could write in the symbols that can call the variables defined in the stage into the symbols.
    Thank you so much for any help. It is greatly appreciated .

    Hi, I've literally just solved this problem for myself! I've been unable to get variables remembered within symbols too. This will be familiar if you've accessed the Stage from within a symbol already, like so (this kind-of takes a step back and takes you to the main stage from within the symbol):
    sym.getComposition().getStage().$("anElement").hide();
    The way I've updated the score (displayed on the stage) from within a symbol it is to GET the variable from the stage:
    var score = sym.getComposition().getStage().getVariable("score");
    score += 100;
    sym.getComposition().getStage().$("valueDisplay").html(score);
    sym.getComposition().getStage().setVariable("score", score);
    So for you I'd recommend:
    var variable1 = sym.getComposition().getStage().getVariable("variable1");
    var variable2 = sym.getComposition().getStage().getVariable("variable");
    if(variable1 > variable2) { this }
    else { that }
    If you wanted to update the variables and store them on the stage, then you'd do that similarly:
    variable1++;
    sym.getComposition().getStage().setVariable("variable1", variable1")
    Hope this helps, I may not be 100% and it may be explained better as I'm learning as I go myself!
    Ray

  • Dynamic SQL query to get single value from list in a column

    I have two tables: tblWorkers and tblSkills. tblWorkers has a
    column, Skills, which is populated from a multiple-checkbox form
    field with one or more skill_IDs from tblSkills, so each
    tblWorkers.Skills consists of a list of one or more comma-delimited
    values. For any Skill_ID, I need to generate a listing of all
    Workers with the corresponding skill, so I have tried to do
    something along the lines of SELECT WorkerName FROM tblWorkers
    WHERE Skills IN (Skills, #FORM.Skill_ID#) ... or WHERE Skills IN
    (ListFind(Skills, #FORM.Skill_ID#)) ... etc. ??? My results (once I
    got data type mismatches out of the way) return all Workers, not
    just those with the desired Skill. There must be an easy way to do
    this ... How do people with a bit more CF/SQL experience than I
    have do this???

    quote:
    Originally posted by:
    lucapac
    I have two tables: tblWorkers and tblSkills. tblWorkers has a
    column, Skills, which is populated from a multiple-checkbox form
    field with one or more skill_IDs from tblSkills, so each
    tblWorkers.Skills consists of a list of one or more comma-delimited
    values. For any Skill_ID, I need to generate a listing of all
    Workers with the corresponding skill, so I have tried to do
    something along the lines of SELECT WorkerName FROM tblWorkers
    WHERE Skills IN (Skills, #FORM.Skill_ID#) ... or WHERE Skills IN
    (ListFind(Skills, #FORM.Skill_ID#)) ... etc. ??? My results (once I
    got data type mismatches out of the way) return all Workers, not
    just those with the desired Skill. There must be an easy way to do
    this ... How do people with a bit more CF/SQL experience than I
    have do this???
    As Kronin implied, we normalize our databases. If you don't
    understand that answer, the book "Database Design for Mere Mortals"
    is often mentioned on this forum.

  • Best Practice for Extracting a Single Value from Oracle Table

    I'm using Oracle Database 11g Release 11.2.0.3.0.
    I'd like to know the best practice for doing something like this in a PL/SQL block:
    DECLARE
        v_student_id    student.student_id%TYPE;
    BEGIN
        SELECT  student_id
        INTO    v_student_id
        FROM    student
        WHERE   last_name = 'Smith'
        AND     ROWNUM = 1;
    END;
    Of course, the problem here is that when there is no hit, the NO_DATA_FOUND exception is raised, which halts execution.  So what if I want to continue in spite of the exception?
    Yes, I could create a nested block with EXCEPTION section, etc., but that seems clunky for what seems to be a very simple task.
    I've also seen this handled like this:
    DECLARE
        v_student_id    student.student_id%TYPE;
        CURSOR c_student_id IS
            SELECT  student_id
            FROM    student
            WHERE   last_name = 'Smith'
            AND     ROWNUM = 1;
    BEGIN
        OPEN c_student_id;
        FETCH c_student_id INTO v_student_id;
        IF c_student_id%NOTFOUND THEN
            DBMS_OUTPUT.PUT_LINE('not found');
        ELSE
            (do stuff)
        END IF;
        CLOSE c_student_id;   
    END;
    But this still seems like killing an ant with a sledge hammer.
    What's the best way?
    Thanks for any help you can give.
    Wayne

    Do not design in order to avoid exceptions. Do not code in order to avoid exceptions.
    Exceptions are good. Damn good. As it allows you to catch an unexpected process branch, where execution did not go as planned and coded.
    Trying to avoid exceptions is just plain bloody stupid.
    As for you specific problem. When the SQL fails to find a row and a value to return, what then? This is unexpected - if you did not want a value, you would not have coded the SQL to find a value. So the SQL not finding a value is an exception to what you intend with your code. And you need to decide what to do with that exception.
    How to implement it. The #1 rule in software engineering - modularisation.
    E.g.
    create or replace function FindSomething( name varchar2 ) return foo.col1%type is
      id foo.col1%type;
    begin
      select col1 into id from foo where col2 = upper(name);
      return( id );
    exception when NOT_FOUND then
      return( null );
    end;
    And that is your problem. Modularisation. You are not considering it.
    And not the only problem mind you. Seems like your keyboard has a stuck capslock key. Writing code in all uppercase is just as bloody silly as trying to avoid exceptions.

  • How to display value from java class with output generated with toplink

    i hava a requirement of displaying (distance ie calculated in java class) with output generated by query.
    ie if output is like
    school name (distance)
    physical address
    here the school name and physical address are retrived from database.

    Hi,
    ValueHolders are used by the JSF internal framework. To work with an object (attributes) in a managed bean you don't need to make it returning a value holder.
    Create a POJO, provide accessor methods and register it as a managed bean. Access it from JSF with EL
    Frank

  • How to grab the value from a drop down list inside a table cell

    Hello,
    My situation is I have a few columns displayed in a table format using repeater tag. Some cells is a dropdown list(<netui:select /> tag). My question is how can I grab the value when user made a selection.
    I believe I can get the row index but I can't use the datasource attribute to get the user selection since it is in a repeater. All the cell use the same datasource and workshop will give "NULL" value when there are more than one tag bind to the same form valiable.
    Any suggestion are very much appreciated! Thanks a lot in advance.
    My snippet code are:
    <netui-data:repeater dataSource="{pageFlow.ownedTask}"><netui-data:repeaterHeader></netui-data:repeaterHeader>
    <tr valign="top">
    <td><netui:select dataSource="{actionForm.userName}" optionsDataSource="{pageFlow.nameList}" onChange="getUser()" ></netui:select>
    </td>
    <td><netui:select dataSource="{actionForm.empDept}" optionsDataSource="{pageFlow.deptList}" onChange="getSelectedDept()" ></netui:select>
    </td>
    <td><netui:label value="{container.item.status}" />
    </td>
    </tr>
    </netui-data:repeaterItem>
    <netui-data:repeaterFooter></netui-data:repeaterFooter>
    </netui-data:repeater>

    1) let drop down box be g_dd.
      if g_dd is initial.
      g_dd = option2.
      endif.
    2)
    by default same pf-status is used by all the screens in the same program
    if sy-dynnr = 'screen_no'. " for screens for which you do not want button to come
    set pf-status 'abc' excluding 'fcode_of_button'
    endif.
    or
    data: git_fcode type sy-ucomm with header line.
    git_fcode = 'fcode_of_button'.
    append git_fcode.
    if sy-dynnr = 'screen_no'. " for screens for which you do not want button to come
    set pf-status excluding git_fcode
    endif.
    Edited by: Amit Gupta on Oct 11, 2008 11:36 AM

Maybe you are looking for

  • Income Tax Exemption on Professional Tax Deducted for Tamilnadu Employees

    Hi Experts, I am working on India Payroll and configured Professional Tax for Tamilnadu employees. Professional Tax is deducted correctly for the employee in the month of August and then in month of January. However while calcuating income tax exempt

  • OnPlus Top 10 and Roadmap - What do you think?

    Thank you all so much for your great feedback! During the past few months, we’ve met and talked to quite a bit of you on shows, events and here on our Support Community, and listened to your comments and requests. Following these discussions and the

  • Logical port entry in SRT_CFG_DEF_ASGN table

    Hello, I am trying to consume a web service thru client proxy. After Service pack upgrade, the default logical port info though present, is not being passed on to the web service proxy. In debug mode, I found that the table SRT_CFG_DEF_ASGN has no en

  • Drag and drop Captivate 6.0

    The Drag and Drop feature on my Captivate 6.0 is no longer active. I think this is because Windows was recently reloaded onto my computer. How do I get it back?

  • Why won't Outlook will not sych with icloud

    Is there a way to de-install icloud and reinstall on a PC with Windows 7 (64bit)?  My computer no longer synchs with icloud and I have duplicate calendars in Outlook and will not open icloud folders?