Problems selecting elements from arrays

I'm having difficulty selecting indexed elements from a array of nodes. I have seen this issues discussed in a number of threads but none address the specific issue which I have encountered.
Previously in version 10.1.2 I constructed a XPath query and then used the BPEL getVariableData function to obtain the element I was after but this doesn't appear to be supported the same way in 10.1.3.1.
I'm using the following expression
bpws:getVariableData('VariableDBResult',bpws:getVariableData('xpath'))
and when I try to compile I get the following error
Error(243):
[Error ORABPEL-10085]: invalid argument
[Description]: in line 243 of "C:\....", the second argument "bpws:getVariableData("xpath")" for getVariableData is not a literal expression.
[Potential fix]: Please correct the second argument, you might need to escape using single quote or " to make it literal.
I used the same code in 10.1.2 and it compiled fine.
For reference the XPath is formed as follows
concat('/ns3:Result/ns3:t/ns3:c/ns3:e[',bpws:getVariableData('loop'),']')
But the error occurs at compile time not run time so I suspect the way the xpath is formed would not affect the compile
I'm suspecting the problem has something to do with the fact that I'm using the function without the optional "pat name" the variable "VariableDBResult" is defined by a schema not a WSDL message type. I have compiled the Array sample 112 which used a part name and it works but in my case without the part name it fails.
I attempted to cast the expression to a string and use a string variable, all to no avail.
Any help or suggestions will be greatly appreciated.
Regards
Graeme

Has anybody got around this issue...I searched the forums but allI could get it unresolved threads pointing to this problem
getVariableData is not a literal expression
Re: getVariableData is not a literal expression
Literal function error
Literal function error
I want to mention that its a compile time issue and I am using Jdev 10.1.3.4

Similar Messages

  • Get selected elements from a table

    Hi all,
    I have a requirement like i m enhancing standard component in that i have added one button on click of that i want fetch the selected line item from the table ( which is a normal table). selection mode is auto.
    i tried with  the following code.
    DATA:lr_element                   TYPE REF TO if_wd_context_element,
           lv_index                     TYPE i.
    *--Get selected element
      lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
    ****Here itself its throughing dump because lr_element is initial***************
    *--get selected element index.
      lv_index = lr_element->get_index( ).
    can any one help me what is the wrong.. else suggest me how to get the selected elements from a table....
    Thanks in advance.

    *--Get selected element
    lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
    if  lr_element is bound.
    lv_index = lr_element->get_index( ).
    endif.
    Instead you can directly read the node if that row is a lead selected one.
    lo_node = wd_context->get_child_node( name = 'EMP' ).  "Emp is node name
    lo_ele = lo_node->get_lead_selection( ).
    or
    lv_index = lo_node->get_lead_selection_index( ).
    where is the above code written..is it written in OnLeadSelect event of the TABLE..
    can any one help me what is the wrong.. else suggest me how to get the selected elements from a table....
    As the selection mode is Auto there is no multiple selection..hence try to use the lead selection only.
    Edited by: Lekha on Jan 3, 2012 6:47 PM

  • Remove element from array

    hi
    if i have an array
    eg
    int[] array = {4,2,1,2,1};
    how to i remove the index 2 from it and create a new array?
    thanks

    You can't remove the element--an array's size is fixed at creation.
    If you want a new array, create a new one that's one element smaller, then use System.arrayCopy to copy the elements you want to keep.

  • Deleting elements from Arrays.

    Hello,
    I have to be able in this latest exercise to delete an element from an Array. I was wondering if you could give me code examples on how to do this. I am pretty sure that you have to read through the array and return "null" when you hit the element that you want to delete in the array.
    Thank you.

    Look through the forum. There are at least two other threads open with people asking the same question.

  • How can i add selected element from one node to other node

    Hi All
    I have below requirement.
    Say In the view leftside Available Languages ItemList Box  Rightside Available Languages ItemList Box and Add & Remove Buttons in the middle.
    User selects languages from Available Languages ItemList Box clicks on add it will adds to the Available Languages Item List box and ViceVersa with Remove Button.
    1) I have created 2 nodes 1) AvlLang 2) SelLang both contains two attributes Key and Value.
    2) For AvlLang node,  Property : Data Dictonary binded with table. Values are coming fine in Available Languages ItemList Box.
    3) How can i add selected language into the node Available Languages.
    Please provide the code snippet how to achieve this.
    BR
    X- CW

    Hi Carlin,
    Find below code to copy selected record from one node to another.
    Here I am copying it_lips node into pack_mat node.
    DATA: wa_temp TYPE REF TO if_wd_context_element,
                lt_temp TYPE wdr_context_element_set,
                count type c.
          DATA : lo_nd_it_lips TYPE REF TO if_wd_context_node,
                 lo_el_it_lips TYPE REF TO if_wd_context_element,
                 ls_it_lips TYPE wd_this->Element_it_lips,
                 lt_it_lips TYPE wd_this->Elements_it_lips,
                 ls_unpack TYPE wd_this->Element_unpack,
                 lt_unpack TYPE wd_this->Elements_unpack.
    * navigate from <CONTEXT> to <IT_LIPS> via lead selection
          lo_nd_it_lips = wd_context->path_get_node( path = `ZRETURN_DEL_CHANGE.CHANGING_3.IT_LIPS` ).
          CALL METHOD lo_nd_it_lips->get_selected_elements
            RECEIVING
              set = lt_temp.
    * navigate from <CONTEXT> to <PACK_MAT> via lead selection
          lo_nd_pack_mat = wd_context->get_child_node( name = wd_this->wdctx_pack_mat ).
          LOOP AT lt_temp INTO wa_temp.
            CALL METHOD wa_temp->get_static_attributes
              IMPORTING
                static_attributes = ls_it_lips.
                  ls_pack_mat-vgbel = ls_it_lips-vgbel.
                  ls_pack_mat-vgpos = ls_it_lips-vgpos.
                  append ls_pack_mat to lt_pack_mat.
                  CLEAR ls_pack_mat.
          endloop.
            lo_nd_pack_mat->bind_table( new_items = LT_PACK_MAT
                                        SET_INITIAL_ELEMENTS = abap_true ).
    Cheers,
    Kris.

  • Dynamically create empty mcs and asign elements from array and loadmovie

    I'm creating an educational game for my school students.
    A little boy is flying through the city when he encounters objects flying from left to right.
    He hears a SOUND eg: Dog - he must go and click the dog image with the flying cursor. There are at least 5 DIFFERENT objects that should be flying on the screen. There could be various of them at any one time.
    I have the roots of the images in an xml file. And the actual swf are in a file called IMAGE and the sounds in SOUND.
    My problem is that most tutorials I see use the attachmovie method but I don't want to put all the swf's in the library as there are hundreds.
    I have to use the loadmovie method.
    I take it I have to loop through the array and assign each element to an empty movieclip which in turn is in the loop so you get 5 empty clips - I will use i (index). It doesn't seem to be working. I shall keep trying and post back here if I get any luck but I'm running out of ideas.
    Then the objects have to float across the screen. Don't know whether to use tween object or onEnterFrame handler or other. AND someone has mentioned using setinterval to "spit out" the objects.
    BUT if I have five flying across the screen I'm left without clips to stick in any more.
    Oh my head hurts but I will keep going.
    CHEERS if any help is around. This should be quite a standard thng for game developpers. Code at the moment
    function loadEnemies():Void {
    enemy_xml = new XML();
    enemy_xml.ignoreWhite = true;
    enemy_xml.onLoad = function(success:Boolean) {
    if (success) {
    _root.parseEnemyXML();
    //enemy_xml.load("level_"+level+".xml");
    enemy_xml.load("data/animal_catch.xml");
    function parseEnemyXML():Void {
    rows = enemy_xml.firstChild.childNodes.length;
    for (var i:Number = 0; i<rows; i++) {
    var row_string:String = String(enemy_xml.firstChild.childNodes[i].firstChild.firstChild);
    _root["row_"+i+"_array"] = row_string; //MAIN ARRAY holds an array images/dog_a.swf/ images/cat_a.swf etc... all five
    _root.createEmptyMovieClip("enemyObjects", 1);
    enemyObjects.createEmptyMovieClip("holder_"+i, i);
    _root["object"+i] = new Sound(enemyObjects["holder_"+i]);
    trace(row_string);
    loadMovie["row_"+i+"_array"], ["holder_"+i]
    if (level == 1) {
    alerts_mc.play();
    } else {
    currRow = 0;
    rowCounter = 0;
    OK got to about here BUT
    a. I started to get confused around the createEmptyMovieClip part
    b. I KNOW I shouldn't have Sound(enemyObjetcs etc... BUT I copied the code from a tutorial and I don't know what to replace it with.
    I'm close but I need a little polishing.

    It doesn't do you much good to work with borrowed code that you do not understand.  Your best bet will be to start small, creating one functional piece of the puzzle at a time, and work your way up.  Start with making sure you are loading and parsing the xml properly, then set about loading the external content, then see about making that content move around, etc...
    In the code you show, your loadMovie line of code does not resemble anything I have seen before, looking more like (but not quite like) a multi-dimensional array element than a loadMovie() function call.  If you find you need to have control of the items as soon as they load, then you should consider using MovieClipLoader.loadClip instead of loadMovie.  The MovieClipLoader class provides features, such as to be able to determine when items have fully loaded.

  • Deleting all elements from array and array to spreadsheet string

    Hello,
    I would like to write a new data file for each "recording" session without closing the VI.  My problem is that the last "recording" session's data is at the top of every successive session's text file.  I do not want this.  I've tried to delete all rows from the array after my array to spreadsheet string function, but I think the problem is somewhere with the shift register and how the array is built.  I'm not too familiar with LabView and this aspect of my interface is driving me crazy.  Attached is my code and two successive data files.  I have not been able to find a solution on these or the LAVA forums.  Any help would be appreciated.
    Also, I know there is an easier way to write this kind of streaming data, but I need to do it this way for other devices and synchronization purposes.
    Attachments:
    testsecond.txt ‏90 KB
    test41.vi ‏80 KB
    testfirst.txt ‏78 KB

    A few more comments to your code:
    Your loop does not have a wait, meaning it spins the empty case millions if times per second, consuming all CPU while not doing anything. Add an indicator to [i] to see.
    To clear a 2D array in one case frame, just don't wire the output tunnel and set it to "use default if unwired". You'll get an empty array. No fancy tools needed.
    I probably would use an event structure and also protect the data if the save dialog is canceled.
    Here's a simple draft that probably requires a bit more work but should show some of the ideas.
    You should also
    add some protection that the VI cannot consume all available memory if it runs forever.
    Create a seperate case to save the data later if the file dialog is cancelled the first time.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    test41MOD.vi ‏107 KB

  • Problem selecting records from multiple tables

    Good day
    I am writing  a report showing actual vs budget amount per period.  The actual amounts are in one table and the budget amount are in another table.  In this example it is for vehicle sales.  The problem is that in the budget table, there are no records for a particular make if it was not budgeted to make a sale.  If I try to get the records using the select expert it matches the key in actual table with key in budget table and retrieve.  What happens then is that the records in the actual table get excluded if there was not a record for it in the budget table.  How do I then do this selection, i.e. if there is a record in the budget table, then retrieve, otherwise make the budget amount 0?
    Thanks
    Wilhelm

    This is always difficult the best way is to use a command and union the two sets of data.
    First part uses a left outer join from Actual to Budget and brings back all actual data with and without a budget.
    Second parts brings back data from budegt where nothing exists in actual
    select (field list) from
    Actual a
    left outer join Budget b on a.field = b.field
    where (any other filter condition)
    union all
    select (field list) from
    budget b
    left outer join actual a on b.field = a.field and a.field is null
    where (any other filter condition)
    You can get the first query from your current report and the modify to build the second unioned query.
    Ian

  • Problem loading element from a xmlHttpRequest

    I must be losing my mind... But this is what I am facing:
    I have a site that's basically built around the xmlHttpRequest object.
    Homepage --> xmlHttpRequest --> loads pageA.php into element of Homepage
    Homepage loads pageA.php to populate a tag. Once pageA.php is loaded, a user can make another xmlHttpRequest call to load another page to populate another element within the "pageA.php" page.
    pageA.php (now within homepage) --> xmlHttpRequest --> loads pageB.php into element of pageA.php
    This is when sh*t hit the fan... Safari (as well as Shiira, which uses Safari's rendering engine as I understand it... but strangely, Camino takes it ok) complains with an error "TypeError - null value". Has anyone had this kind of problem happened to them before?
    My initial guess is that when is loaded, Safari is actually blind to it. So when pageA.php makes the xmlHttpRequest call to the server to populate it, Safari thinks that never existed and complains that it's a null value...
    Any help/suggestion/workaround or just a rebuttal theory (or to correct my baseless assumption) is welcome...
    Old school PowerBook G4 800Mhz   Mac OS X (10.4.7)  
    Old school PowerBook G4 800Mhz   Mac OS X (10.4.7)  

    I was having a similar problem. Are you using innerHTML or appending a childNode? I was appending a childNode each time but trying to use the same ID without deleting the first one. Here is how I solved mine with some help from ##javascript on freenode.
    var removeMe = document.getElementById('someID');
    if(removeMe){ removeMe.parentNode.removeChild(removeMe); }
    then proceed with your ajax routine.

  • Delete from multiple rows elements from Array

    I have an array that contains about 3700 rows, and 4 columns. Every 37 rows a cycle of data begins. I would like to delete the first row of every cycle of data (i.e. row 1, row 38, row 75, row 111, etc -- until I have deleted every 37th row in the entire array). Then if possible I would like to take an average of rows 2 through 37, 39 through 74, 76 through 110, etc...
    Any help would be greatly appreciated.

    > After I modify the arrrays, I am displaying them both in lab view (in
    > multiple different graphs and a table), and then also using active X
    > to transfer the data to Excel (where is will be re-arranged and
    > plotted accordingly).
    >
    > I indeally need to get an average of the points in the array about
    > every 36 rows, and then display this, since I am looking to track the
    > output decay over time. If you have any suggestions as how I might
    > find and average of every x number of rows in an array, and either
    > input these into another array or a table, that would be greatly
    > appreciated.
    >
    I can't see the original post about the data shape, but if you have a 2D
    array, wire it into a For loop. Use i mod 36 equals 0 to select whether
    you
    add the array to the current total in the shift register, or whether
    you divide the total array by 36 and append it to the averages array,
    then overwrite the total to restart the process. If the rows isn't
    doesn't contain an integer multiple of 36 rows, you need to deal with
    the excess data either ignoring or making an average with a different
    denominator. I'd assume you do this outside the loop.
    Greg McKaskle

  • Problem selecting audio from menu

    When I choose the audio option in the menu and play the movie, it goes well. But if I choose an audio option and then a particular chapter from the Chapter menu, the audio option is not taken. Why is that?

    DVD or Blu-ray?
    How are you testing this?

  • Move element in array individually

     Hello
     I'm trying to make a vi that could move individual element in an array 
     What I did was, I have a pict ring in an array so that I can have as many picture that I need
     But the problem is, if I want to move the picture, I'll end up moving the whole array
     Is there any way that I could try, to be able to move only the element?
    In the vi that I attached, if I link Node-TCP-FTP, I can then move those 3 at the same time 
    I'd like to be able to produce several of Node-TCP-FTP so that I can connect the nodes to each other later 
    I'm trying to make each Node-TCP-FTP pair to be independent so that user can move it wherever they like before connecting node-node  
    I tried using array, but it gets mix up in the end 
    It won't be a good thing if I limit the number of Node-TCP-FTP pair that the user can make if I were to use separate ring for each of it 
    Is there any other way that I could try?  or is it possible to move the selected element from the array so that I can make an array of Node, TCP, FTP instead of what I've done?
    Thanks
    Attachments:
    subitemMove1.vi ‏67 KB

    Your description is very confusing to me.  You talk about having arrays and multiple inpdependent pairs of these objects, but you only have one set of objects set up and they don't have anything to do with arrays.
    I think you should probably be working with picture controls rather than picture rings.  Search the forums, I think Ben had a large nugget on working with pictures.
    PS.   There is no such word as "traffics".  It should be "traffic".

  • Is there a way to select a certain box of elements from a csv file and read that into LabVIEW?

    Hello all, I was wondering if there was a way to select only a certain "box" of elements from a .csv file in LabVIEW? I have LabVIEW 2011 and my main goal is to take two arrays and graph them against each other. I can import the .csv file just fine and separate each row and each column to be its own, but say I have an 8X8 but want to graph the middle 4X5 or something like that. Is there any way to extract an array without starting at the beginning and without ending at the end? Thank you in advance.
    Solved!
    Go to Solution.

    Hi Szklanam,
    as a CSV file is just a TXT file with a different suffix you can read a certain number of lines of that file. So you can limit the number of rows in your resultung array. To limit the number of columns you still have to use ArraySubset, so maybe it's a lot easier to read the full CSV file and pick the interesting spots with ArraySubset...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Has anyone had a problem with printing from Elements 9 on a MAC?

    When I first installed Elements 9 and tried to print, all I got were blank pages.  I contacted adobe support and after an hour on the  phone, she referred me to the next level.  I then received an email from them asking me to call them and in the meantime, they suggested things I shoud do.  I did what they suggested and it worked.  I was able to print.  However, I was unable to indicate the type of paper or resolution that I wanted to print in.  So, I called them again.  It seems that on a windows PC, they give you five options for printing:  1.  Select printer, 2.  Select Settings, 3.  Select paper size, 4.  Type of print, and 5.  Select Print size.  On a MAC,  You get only three options:  Select printer, Select paper size and Select print size.  Does anyone know another way to select the settings and type of print.  I have been using Elements 4 for years with no problems.  Elements 4 gives all the  options.  I don't understand why it is not the same in Elements 9.

    Thank you so much.  You have solved my problem.  I never thought to click the down arrow.  In all the time I have been printing, on any program, the entire window opened up when I clicked on the print button.  This one never did.  I don't understand why Adobe support never told me about that when I called them.

  • Problem when removing elements from table after apply sort

    Hi,
    I have big problem with <af:table> and sorting.
    When I removed objects from a table without sorting, there is no problem but when I removed
    items from the table after sorting, the remain items are not correct.
    For example, i have in my table these items :
    Item AA
    Item CC
    Item ZZ
    Item BB
    Item AA
    Item BB
    Item CC
    Item ZZ
    I sort the table and i select the following Items : Item BB a Item CC
    The remains item is only Item AA, Item ZZ disappear.
    If i resort the table, the missing Item zz appear again in the table.
    Here is my jspx :
    <af:table var="row" rowBandingInterval="1" width="1050" rows="5"
    rowSelection="multiple"
    value="#{pageFlowScope.editNotificationBackingBean.ingredients}"
    binding="#{pageFlowScope.editNotificationBackingBean.ingredientsTable}"
    autoHeightRows="10" id="t2">
    <af:clientListener method="goEditRow" type="dblClick"/>
    <af:serverListener type="doubleClickOnRow" method="#{pageFlowScope.editNotificationBackingBean.handleRequestIngredientsSelectBtn_action}"/>
    <af:column headerText="#{bundle.col_fr_name}" width="240"
    sortable="true" sortProperty="name.FR_Description" id="c1">
    <af:outputText value="#{row.name.texts['fr'].value}" id="ot1"/>
    </af:column>
    In my backing bean i call this method to remove selected elements :
    public void unselectBtn_action(ActionEvent actionEvent) {
    RowKeySet rowKeySet = selectIngredientsTable.getSelectedRowKeys();
    int i = 0;
    Iterator it = rowKeySet.iterator();
    while (it.hasNext()) {
         Integer index = (Integer)it.next() - i;
    selectIngredientsTable.setRowKey(index);
    CompositionIngredient compositionIngredient =
    (CompositionIngredient)selectIngredientsTable.getRowData();
    notification.getProductDetail().getCompositionIngredients().remove(compositionIngredient);
    i++;
    selectIngredientsTable.getSelectedRowKeys().clear();
    AdfFacesContext.getCurrentInstance().addPartialTarget(selectIngredientsTable);
    Thanks in advance.

    I have made a mistake, i don't paste the right <af:table> from my jspx.
    Here is the correct one :
    <af:table var="row" rowBandingInterval="1" width="1050"
    rowSelection="multiple" id="tableSelectedIngredients"
    value="#{pageFlowScope.editNotificationBackingBean.notification.productDetail.compositionIngredients}"
    binding="#{pageFlowScope.editNotificationBackingBean.selectIngredientsTable}"
    partialTriggers="::tab_ingredients_list_expressed_per">
    <af:column sortable="true" headerText="#{bundle.col_name}" id="c5" width="180"
    sortProperty="ingredient.name.FR_Description">
    <af:outputText value="#{row.ingredient.name.texts['fr'].value}"
    id="ot18"/>
    </af:column>
    ...

Maybe you are looking for

  • Exporting photos & Burning a DVD-R

    I have an album with some pics I'd like to send to a relative. I can't export the album - nothing happens. I have to make a slideshow first, then export the slideshow to a folder, insert a DVD-R, and drag the folder to the DVD in the Finder. However

  • Command query & help

    dear all ., can any one tell how can i query and get help of any command that i want to see like i need to know all the commands started with ALTER DATABASE for example ., thanks [email protected] [email protected]

  • Info Pack asks for trasnport request

    Dear all, After Patch Upgrade from EHP4 to EHP 10 , During Info pack edit it is asking for transport request. we done below setting: Transport connection>Object changeability>Info Package Type: (ISIP)--->Everything Changeable. we are in SAP_BW (SAPKW

  • APEX 4 Bug: Wrong quickpicks in Item Page's Read Only section

    This bug is an easy one In Edit Page Item page, Read Only section, the predefined option list (now quickpicks) is as follows: [PL/SQL] [item=value] [item not null] [request=e1] [page in] [page not in] [exists] [none] [never] But if you look carefully

  • Installing Lightroom on a Mac

    I'm using the desktop version to LR5 for Windows and I'd like to install LR5 on my Macbook Air (OSX 10.9.4).  To do so, I'm asked to download Creative Cloud, but I'm confused.  I thought CC was for those who were interested in the subscription based