Problem getting the count of element

Hi all,
I am using a webservice which converts excel to string, which i store in an variable. I parse this variable using to parseXML function and assign it to and element type. The element is created from xsd. The xsd is created from the output of the webservice.
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://TargetNamespace.com/IncomngCS"
xmlns:tns="http://TargetNamespace.com/IncomngCS"
elementFormDefault="qualified"
attributeFormDefault="unqualified" nxsd:encoding="ASCII" nxsd:stream="chars" nxsd:version="NXSD">
     <xsd:element name="SHEET">
          <xsd:complexType>
               <xsd:sequence>
                    <xsd:element name="ROW" maxOccurs="unbounded">                    <xsd:complexType>
     <xsd:sequence>
                                   <xsd:element name="DATESRV" type="xsd:string"/>
                                   <xsd:element name="TACT" type="xsd:string"/>
                                   <xsd:element name="TCHG" type="xsd:string"/>
                                   <xsd:element name="TAMNT" type="xsd:string"/>
     <xsd:element name="TQTY" type="xsd:string"/>
     </xsd:sequence>
     </xsd:complexType>
     </xsd:element>
     </xsd:sequence>
<xsd:attribute name="currentrow"/>
     </xsd:complexType>
</xsd:element>
</xsd:schema>
The variable of element type gives output as
<var_tmp>
<SHEET>
<ROW>
<DATESRV>2/3/2006</DATESRV>
<TACT>100561141</TACT>
<TCHG>3403516</TCHG>
<TAMNT>249.55</TAMNT>
<TQTY>1</TQTY>
</ROW>
<ROW>
<DATESRV>2/3/2006</DATESRV>
<TACT>100561141</TACT>
<TCHG>3400934</TCHG>
<TAMNT>72.55</TAMNT>
<TQTY>1</TQTY>
</ROW>
<ROW>
<DATESRV>2/3/2006</DATESRV>
<TACT>100567114</TACT>
<TCHG>3406931</TCHG>
<TAMNT>34.5</TAMNT>
<TQTY>1</TQTY>
</ROW>
</SHEET>
<var_tmp>
And now when i try to get the count(getVariableData('var_tmp','/sheet/row')) it always gives me 0. I tried to get particular row using index its still does not seem to work.
Does anybody have any idea about this problem?

Can you post your .bpel source so I can see what's going on there?
Thanks
Dan

Similar Messages

  • BPEL function to query the Element Name and get the count of elements

    Hi Guys,
    I have problem with the following, can you please help me out with this.
    Say i have an xml pay load:
    <ns1:sampleEBO>
                   <ns1:PhysicalLocation>
                   <ns1:propertis>
                        <ns1:filedType>12</ns1:filedType>
                             <ns1:filedType1>12</ns1:filedType1>
                             <ns1:filedType2>12</ns1:filedType2>
    <ns1:filedType3>12</ns1:filedType3>
                             <ns1:filedType4>12</ns1:filedType4>
                             <ns1:filedType5>12</ns1:filedType5>
    </ns1:properties>
    <ns1:propertis>
                        <ns1:filedType>12</ns1:filedType>
                             <ns1:filedType1>12</ns1:filedType1>
                             <ns1:filedType2>12</ns1:filedType2>
    <ns1:filedType3>12</ns1:filedType3>
                             <ns1:filedType4>12</ns1:filedType4>
                             <ns1:filedType5>12</ns1:filedType5>
                   </ns1:properties>
    <ns1:sampleEBO>
                   <ns1:PhysicalLocation>
    Here i want to retrive the Element name ( filedType,fieldType1,fieldType2......) using any BPEL function, not the value and also get the total number of elements in the each node ( <properties> ). If i am using the "count" function its returning 2 and it's counting the properties node not the elements in the properties node.
    So, can you please let me know of any function in BPEL which can do this ?
    Thanks,
    Krish

    you only want to use a default bpel function for this? not from within xsl?
    and the function should return an arraylist of elementnames i assume ?
                   <xsl:for-each select="//properties">
                        <xsl:for-each select="./*">
                             <xsl:value-of select="local-name()"/>
                             <xsl:choose>
                                  <xsl:when test="substring(local-name(),1,9) ='filedType' ">
                             </xsl:when>
                             </xsl:choose>
                        </xsl:for-each>
                   </xsl:for-each>
                   <count1><xsl:value-of select="count(//properties[1]/*)"/></count>
                   <count2><xsl:value-of select="count(//properties[2]/*)"/></count>the count can also be used in some for-each construction or from within your bpel flow itself (if you want to loop over there, instead of xsl)

  • How to get the number of elements in DB

    Could you tell me how to get the number of elements in DB??
    My code to get the number is below, but I think it is not efficient
    DB->cursor(DB, NULL, &cursorp, 0);
    while ((ret = cursorp->c_get(cursorp, &key, &data, DB_NEXT)) == 0)
    count++;
    --------------------------------------------------------------------------------------------------------------

    Hi,
    The most efficient way to get a count from the database is using the DB->stat API (http://docs.oracle.com/cd/E17076_02/html/api_reference/C/dbstat.html)
    The code will be something like:
            DB *dbp;
            DB_BTREE_STAT *statp;
            int ret;
            /* Print out the number of records in the database. */
            if ((ret = dbp->stat(dbp, NULL, &statp, 0)) != 0) {
                    dbp->err(dbp, ret, "DB->stat");
                    goto err1;
            printf("%s: database contains %lu records\n",
                progname, (u_long)statp->bt_ndata);
            free(statp);The code comes from the example included in the distribution at examples/c/ex_btrec.c
    If the database isn't a btree, you should update to the appropriate statistics structure and field.
    It's worth noting that retrieving the count is never a "cheap" operation. The count is not stored in the database - since doing so introduced a single point of contention that creates a bottle neck.
    Regards,
    Alex Gorrod
    Oracle Berkeley DB

  • How to get the current tree element (node/childnode/childnode/...) ?

    Hello!
    I'm trying to create a kind of a navigation tree for my application.
    It should represent some elements of an XML structure and some other nodes for other options.
    The binding with the context is not a problem, I can create the tree up to all the levels I want to.
    The problem now is, that I don't know, how to get the "current tree element", when there is any action.
    For example:
    public void onActionSelect(...) {
    String test = wdContext.currentTreeNodeElement().getText();
    wdThis.wdGetContext().currentContextElement().setSelectedElement(test);
    With this method I can get the text of the "first level nodes". If I want to get the "second level node", I can do
    String test = wdContext.currentTreeNodeElement().currentChildElement.getText();
    ..and for the next levels so on.
    Isn't there any general method to get the information of the selected element without knowing before, whether it is a nodeElement or a nodeElement.currentChildElement or a nodeElement.currentChildElement.currentChildElement, ...?
    Greetings,
    Ramó

    Hi,
    if you following that pdf ,
    i think your not implemented the below code in DomodifyView method
    if (firstTime) {
          IWDTreeNodeType treeNode = (IWDTreeNodeType) view.getElement("TheNode");
          /* The following line is necessary to create parameter mapping from parameter "path" to parameter "selectedElement".
    Parameter "path" is of type string and contains the string representation of the tree element (its corresponding context element to be exact)
    that raised the onAction event. Parameter "selectedElement" is of type IWDNodeElement (or extends it) and is defined as parameter in the event handler
    that handles the onAction. The parameter mapping defined here translates the String "path" into the corresponding context element that then can
    be accessed within the event handler
          treeNode.mappingOfOnAction().addSourceMapping("path", "selectedElement");
          /* The following line is necessary to create parameter mapping from parameter "path" to parameter "element".
    Parameter "path" is of type string and contains the string representation of the tree element (its corresponding context element to be exact)
    that raised the onLoadChildren event. Parameter "element" is of type IWDNodeElement (or extends it) and is defined as parameter in the event handler
    that handles the onLoadChildren. The parameter mapping defined here translates the String "path" into the corresponding context element that then can
    be accessed within the event handler
          treeNode.mappingOfOnLoadChildren().addSourceMapping("path", "element");
    please cross check once.
    Thanks,
    Ramesh

  • Select Count(*) from Sample_table - how to get the count using JDBC?

    Hi All,
    It would be glad if anyone could help me with this. The problem is that I have to get the 'count' of records selected from a arbitrary table say, 'sample_table'. Is that possible to form the SQL in JDBC as
    Select Count(*) from Sample_table
    and get the value of the count? If yes, how?
    Thanks in advance
    Prabz

    stmt = con.createStatement();
    ResultSet recordcnt_rs = stmt.executeQuery("Select Count (*) as record_ctr From Sample_table");
    recordcnt_rs.next();     
    record_ctr = recordcnt_rs.getInt("record_ctr");
    hope this helps.

  • How to get the count of each minutes

    Oracle 10 DB
    Hi All
    I using this query to get the count of records fetched by the concurrent program per min,
    select count (distinct b.attribute2)
    from oe_order_headers_all a,oe_order_lines_all b
    where a.header_id=b.header_id
    and b.flow_status_code ='AWAIT_QUINTIQ_BOOK'
    and to_Char(b.last_update_date,'DD-MON-YYYY HH24:MI:SS') between '19-JAN-2011 02:00:01' AND
    '19-JAN-2011 02:00:02'
    This is used to get the count of records fetched at one mins
    How to find the count of last 10 mins ie 1 mins count 2.00 to 2.10
    Thanks & Regards
    Srikkanth.M

    Try this:
    SELECT TRUNC(b.last_update_date, 'mi') time_mins, COUNT(DISTINCT b.attribute2)
    FROM   oe_order_headers_all a,
           oe_order_lines_all b
    WHERE  a.header_id = b.header_id
    AND    b.flow_status_code = 'AWAIT_QUINTIQ_BOOK'
    AND    b.last_update_date >= to_date('19/01/2011 02:00:00', 'dd/mm/yyyy hh24:mi:ss')
    AND    b.last_update_date < to_date('19/01/2011 02:10:00', 'dd/mm/yyyy hh24:mi:ss')
    GROUP BY TRUNC(b.last_update_date, 'mi');I'm not sure why you're bothering with the join to the oe_order_headers_all table, since you're not referencing that in the where clause or the selected columns list. I think you could probably do away with it.
    I've changed your code to take the last_update_date and truncate it to the minute level, and added that as a column, so you can see which count goes with which minute. Obviously, this has to be in the group by.
    I've also changed your date comparisons so that you're actually comparing dates to dates, rather than strings to strings - why would you deliberately take information away from the optimizer? Oracle does not treat strings the same as dates, and forcing it to use strings rather than dates could lead you to have a vastly differing execution path, which will most likely be less performant.
    Not to mention, coding like that leads you to assume that you can compare dates in strings without any problems, and that is just not the case. '19-FEB-2011' is counted as being earlier than '19-JAN-2008', as strings sort alphabetically.

  • How to get the Count of a logic?

    Hi,
    Very new to CRM. I am trying to get the count of "activity start time" that are greater than current time stamp. Count(activity start time) work. I don't know how to add the time stamp condition to this. I can't add this condition as filter.
    Appreciate any responses.
    Thanks

    Raghu,
    Thanks for the help. It works to get the count.
    The problem is, i have some other filters set and can't combine this filter. Here is my scenario:
    get all activities on a contact that have greater than x $ amount as assets. I need to find the number of future appointments for that contact and start time of first pending future appointment. All has to be in one report.
    My columns are for example : contact name, activity start time, end time, subject, next pending appointment start time, total future appointments, some other related fields from contact
    So when I add the filter that you had given, it will not give me all activities. I am able to achieve all this in seperate reports and unnable to get it in single one.
    Thanks,
    GiGi

  • SQ01 - SAP List Viewer - Ability to get the count of the output records

    Hello All,
    I have a problem with the SAP List Viewer output for an SAP Query.
    I have created a SAP query (SQ01) for a table. Its a basic query that queries on just one table (VTBFHA)
    When I run the query, for the output in the SAP List Viewer (ALV) format, Could anyone kindly help me figure out how to get the count of the number of records displayed in the output?
    For Eg: when we run the T code SE16, It gives us the number of records displayed in the output.
    Similarly, does anyone know if there is a way I could display the count of the number of records displayed in the output of the SQ01 query?
    I have tried checking the "Counter" in the basic list tab, but it does not give me the count.
    Any help will be greatly appreciated
    Thanks
    Subhani

    Yes there is a solution. Follow these steps
    Select your query
    Hit the button InfoSet Query
    Go to Edit->Settings->
    Check the box "Count in the Output list" in the Output tab
    Hit Save
    In pop up box select the user group
    hit enter
    Hit the back arrow (F3)
    now Execute the query
    You should be able to see the count in the output.
    The count will appear on the right most column of the output. If it does not go to the "Change layout" option and make sure it is part of the "Displayed columns list".
    Regards

  • How do you get  the count of number of  checkbox selected?

    hi,
    plz tell me how do you get the count of number of checkbox selected?

    Not sure what you are doing so I will attempt to answer your question. If have one question which can have multiple answers you have will recieve an array so you have to do getParameterValues("name") and move it into an array.
    If you have multiple questions and only value will be selected do a getParameter("name") on each form element.
    HTH, if not provide more detail.
    J.Clancey

  • How can i get the count vaule from GPIB?

    I want to get the count waule from GPIB ,but I find that the vaule I get from GPIB now is the trace vaule ,
    so I ask How can i get it.

    The count of what? What kind of instrument are you using?

  • To get the count of records and able to access the column value in a single

    Hi
    Is there any way to get the number of records in the query and access the column values
    e.g
    select count(*)
    from
    (SELECT department, COUNT(*) as "Number of employees"
    FROM employees
    WHERE salary > 25000
    GROUP BY department ) a
    This wil only get the Count, if i want to access each row from the inline view how can i do that.

    Your question is not clear.
    Are you looking for total record count as well as count by department ?
    Something like this?
    SQL>
    SQL> with temp as
      2  (
      3  select 1 dept ,10000 sal from dual union
      4  select 1 dept ,25100 sal from dual union
      5  select 1 dept ,30000 sal from dual union
      6  select 1 dept ,40000 sal from dual union
      7  select 2 dept ,10000 sal from dual union
      8  select 2 dept ,25100 sal from dual union
      9  select 2 dept ,30000 sal from dual union
    10  select 2 dept ,40000 sal from dual )
    11  select count(*) over( partition by 1 ) total_count,dept,
    12  count(*) over(partition by dept) dept_cnt  from temp
    13  where sal>25000;
    TOTAL_COUNT       DEPT   DEPT_CNT
              6          1          3
              6          1          3
              6          1          3
              6          2          3
              6          2          3
              6          2          3
    6 rows selected
    SQL>

  • Get the Count for each row

    I'm trying to get the count for each row to total count for each month
    Something like this
    Hardware     |      Jan
    Monitors       |       5
    Processors   |      137
    Printers        |      57
    etc........
    How can I write a query for this. I can get the Hardware column but don't know how to get the next column.

    If you can provide more data like sample input DML statements it would have been wonderful..
    Assuming is , you need a pivot. Here is an article on basic Pivot..
    http://sqlsaga.com/sql-server/how-to-use-pivot-to-transform-rows-into-columns-in-sql-server/
    something like this may be..
    DECLARE @Input TABLE
    Hardware VARCHAR(20),
    [Date] VARCHAR(20)
    INSERT INTO @Input VALUES('Monitor', '01/01/2014'), ('CPU', '01/01/2014'), ('Monitor', '01/03/2014')
    , ('ABC', '01/01/2014'),('Monitor', '02/01/2014')
    ;WITH CTE AS
    SELECT Hardware, LEFT(DATENAME(M, [Date]),3) AS [MonthName] FROM @Input
    SELECT *
    FROM
    SELECT Hardware, [MonthName], COUNT(Hardware) AS Count FROM CTE GROUP BY Hardware, [MonthName]) a
    PIVOT (MAX([Count]) FOR [MonthName] IN ([Jan], [Feb])) pvt
    Please mark as answer, if this has helped you solve the issue.
    Good Luck :) .. visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • How to get the number of elements in a tilelist

    I'm writing test cases for a flex application using FlexSelenium and I need to get the number of elements displayed in the tilelist.
    I know that that the tilelist is fed by an array. but i can't access that array from my test case.
    Can anyone tell me how I can get the number of elements in a tilelist on the application? which property of the tilelist can provide that number?

    try tileList.dataProvider.length;

  • How to get the current node element by its value?

    e.g,:
    wdContext.current<b>Deal</b>Element().setAttributeValue("<i>deal_id</i>","<i>aaaaaaa</i>");
    above code can get the result i wanna.
    but now i wanna in terms of its node'name to  set attribute vaue of itself. in other words,i have no idea about how to get the current node element by its name"<b>Deal</b>".

    Hi Wing,
    The answer is there in your question itself.
    wdContext.currentDealElement()
    will give you the current node element by its name"Deal" or you could use
    wdContext.nodeDeal().getCurrentElement()
    or you could use
    wdContext.nodeDeal().getElementAt(wdContext.nodeDeal().getLeadSelection())
    Regards,
    Sudeep

  • Get the count of rows in a table control

    Hi Experts,
      How do I get the count of the rows in a table control during run time.
    I am developing a BDC in which I have to check all entries in a table control.
    My requirement is to get the total number of rows in a table control dynamically.
    Thanks
    Kumar

    Hi,
    Use a variable when u r passing the records from the internal table to the screen fields
    and display the same.
    I think this idea may help u.
    And pls explain me ur requirement clearly.
    Refer to the following link this may help u.
    http://sapabapnotes.blogspot.com/2008/03/working-with-ecatt-extended-computer.html
    Reward if helpful.
    Jagadish

Maybe you are looking for

  • Hyperlink not responding to Skin

    I've created the following Hyperlink, yet when I render it the skin has no effect on it's appearance. it still is just a small 11pt black font, rather than the 35 pt white text. Am I doing something wrong? Hyperlink{           text: "Test";     skin:

  • What was the error and how i remove (using Tomcat)

    HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception root cause javax.xm

  • Report on Customers

    Hi Gurus, Please could you help me answer if the following is possible? A report to find out when a Bill To or Ship To was last used A report to identify all accounts that have been marked with u201CDo not useu201D A report to identify any duplicate

  • Date - Dimension filter

    Hi In my Design Studio dashboard i have a dimension filter on date field used for filtering the report. I have created a variable with the following specifications in the BW Query: Processing By: Customer Exit - This gives by default the last 365 day

  • Adding and Removing Components to/from a jPanel

    Hello, I am searching for a way to have a jButton create a remove and create some jComboBoxes, jLabels, and jButtons. I don't know how I could do this. I have some screenshots from NetBeans IDE to help illustrate my problem. I want the Add Shift butt