ListItemData.value returns the undefined value

Hi guys

I'm having a weird problem with a ListView.

I made a custom, based on the sample Image Loader

My Custom Image Loader class has more variables and several accessors:

    // The accessor methods of the properties
    QVariant image() const;
    QString label() const;
    bool loading() const;

    //-- MY ACCESORS
    QString desc() const;
    QString target() const;
    QString title() const;
    etc...

In addition, the example uses a QListDataModel, and in my application, I use a GroupDataModel.

The following code works. Is my earlier version in which I didn't load the images on the web:

(lst is a QVariantList loaded from a JSON)

    _dataModel = new GroupDataModel(QStringList() << "porder");
    _dataModel->setParent(this);

    //-- insert the JSON data to model
    _dataModel->insertList(lst);

    //-- make the model flat
    _dataModel->setGrouping(ItemGrouping::None);

    //-- find cascades component of type ListView with an objectName property set to the value 'listView'
    //-- assign data model object (m) to its GUI representation object (list_view)
    if(_listView) _listView->setDataModel(_dataModel);

    _dataModel = new GroupDataModel(QStringList() << "porder");
    _dataModel->setParent(this);

    //-- insert the JSON data to model
    _dataModel->insertList(lst);

    //-- make the model flat
    _dataModel->setGrouping(ItemGrouping::None);

    //-- find cascades component of type ListView with an objectName property set to the value 'listView'
    //-- assign data model object (m) to its GUI representation object (list_view)
    if(_listView) _listView->setDataModel(_dataModel);

I tried to fill the list with my custom class by replacing "_dataModel-> insertList (lst);" with this code:

foreach (QVariant vItem, lst) {
    CustomImageLoader *tempCIL = new CustomImageLoader(vItem.toMap(), this);
    _dataModel->insert(tempCIL);
}

In other words, the same list that was used in the previous version now is iterated and CustomImageLoaders are created, each contains data in the list.

The result is a list with the exact number of items, but they are all empty.

I have connected the properties of tempCIL and they do not contain the same channels from the original list.

By filling the list with the custom class, in my code QML
ListItemData.title now returns undefined instead of a string.

If I print the ListItem ListItemData, it displays an instance of CustomImageLoader.

I did C++ and QML code very similar to the example of Image Loader, and I can't see what is wrong.

Advice and pointers are welcome.

DERP DERP

I'm not even good to copy

I missed the Q_PROPERTYs in all

class CustomImageLoader : public QObject
{
    Q_OBJECT

    Q_PROPERTY(QVariant image READ image NOTIFY imageChanged)
    Q_PROPERTY(QString label READ label NOTIFY labelChanged)

    Q_PROPERTY(bool loading READ loading NOTIFY loadingChanged)

    Q_PROPERTY(QString desc READ desc)
    Q_PROPERTY(QString porder READ porder)
    Q_PROPERTY(QString target READ target)
    Q_PROPERTY(QString title READ titulo)
    ...

4 hours of pain

Tags: BlackBerry Developers

Similar Questions

  • Confidence for app.newDoc function always returns the undefined value

    Hello

    I'm doing a script activated by button.  Its purpose is to save a copy of the first page (form data erasure) in its own file in the same path as the open document.  As part of that I had to create a trust to cover the privileges of the app.newDoc function.  I have the following:

    trustedNewDoc = app.trustedFunction (function (nWidth, nHeight)

    {

    app.beginPriv ();

    app.newDoc (nWidth, nHeight);

    app.endPriv ();

    });

    This was recorded in a file called "newdoc.js" in the "app" of javascript.  I closed my Acrobat Pro XI and restarted.  As soon as I try to activate a button with just: "myDoc = trustedNewDoc var (500,500);", it opens the document as specified, but I get "undefined" returned to myDoc - that avoids manipulation of the Fryer.

    If I run the same line of the console, it also returns the value undefined.  Running "myDoc = var app.newDoc ();" also returns undefined, but just "app.newDoc ()"; only returns '[Doc]' - even if ' trustedNewDoc (500,500); "alone is still undefined.

    In any case, I feel like I'm missing something fundamental, even if I found some guides suggesting to do exactly what I have it implemented.  I am pretty sure I have everything entered correctly and followed all the steps, so at this point I'm stumped.  Any help would be greatly appreciated!

    Thank you

    Mike

    Thanks Gilad, that was exactly what he needed!  And thanks for getting back to me so quickly.  Now, I really wish I would have asked this question more early yesterday after spending hours trying to find a solution.

    Unfortunately there aren't really examples I found where a value was returned.  Maybe it's the good sense and I should have better, but I thought that the value has been returned by other means.  In any case, it's great to work with your help!  Now, I have a separate question, with what I need to see if I can get help. Hey, great work and thank you again!

  • getElementsByTagName(&amp;quot;input&amp;quot;).value); Returns the undefined value

    Help, please! The API DW getElementsByTagName() function returns no value.

    I'm defining the following form part of an extension of bar insert:

    (skip the usual of head)
    < body onLoad = "reportLabel ()" >
    < form >
    < table border = "0" height = "100" width = "100" >
    < tr valign = 'of basic">
    < td align = "left" nowrap >
    A label:
    < input type = "text" name = "label_field" value = "" id = "alabel" > "
    < table >
    < /tr >
    < /table >
    < / make >
    < / body >
    < / html >

    And the following JavaScript code:

    function reportLabel() {}

    Read the label of meta tag in the active document
    var dom = DW.getDocumentDOM (); get the dom of the current document
    var label = dom.getElementsByTagName ("meta");
    for (counter = 0; counter < label.length; counter ++)
    {
    If (label [meter] .name is 'Label')
    Alert (label [Counter]. Content); It works, the function reads the elements of document of the user very well

    But how to find the extension form input field so that I can pre-populate it with the label?

    Alert (document.getElementById("Alabel"). (Name) function undefined, grrr
    Alert (document. GetElementsByTagName("Input").value); returns undefined-> This is the function I want to use
    Alert (document.hasChildNodes ()); Returns true, then the DOM document is readable
    Alert (document.childNodes.Length); Returns 2
    Alert (document. Forms.Length); Returns the value 1
    Alert (document. Forms.childNodes.Length); has no childNodes property
    }
    }

    Thank you!
    -Scott

    getElementsByTagName() returns an ARRAY - so you can not use a point
    operator about it as you have. You have to do, for example:

    getElementsByTagName ('INPUT') [0] .value etc.

    fMichel brandt

    srowe3 wrote:
    > Please help! The API DW getElementsByTagName() function returns none
    > values.
    >
    > I'm defining the following form part of an extension of bar insert:
    >
    > (skipping the usual of head)
    >
    >


    >
    >
    >
    >
    >

    > A label:
    >
    >

    >

    >
    >
    >
    > And the following JavaScript code:
    >
    > function reportLabel() {}
    >
    > / / Read the meta tag tag in the active document
    > var dom = DW.getDocumentDOM (); get the dom of the current document
    > var label = dom.getElementsByTagName("meta");
    > for (counter = 0; counter)< label.length;="">
    > {
    > If (label [meter] .name == "Label")
    > / / alert (label [counter] content); It works, the function reads the
    > the user of the document elements very well
    >
    > / / But how to find the extension form input field so that I can
    > Pre-populate it with the label?
    >
    > / / alert (document.getElementById("alabel").name); function undefined,
    > grrr
    > / / alert (document.getElementsByTagName("input").value); Returns
    > undefined---> this is the function I want to use
    > / / alert (document.hasChildNodes ()); Returns true, then the DOM document is
    > readable
    > / / alert (document.childNodes.length); Returns 2
    > / / alert (document.forms.length); Returns the value 1
    > / / alert (document.forms.childNodes.length); has no childNodes property
    > }
    > }
    >
    > Thank you!
    > - Scott
    >
    >

  • Pass data to jsx function returns the undefined value

    Probably a noob but question why I get defined during the passage of data to a jsx function?

    JavaScript

    var csInterface = new CSInterface();
    csInterface.evalScript ("myFunc ('ack')");

    ExtendScriptfunction

    {myFunc (property)}

    Alert ("connected myFunc get property value:" + property);

    }

    Things work fine if I just a life normal functionc everything without the passage of a variable.

    Found myself in the syntax

    csInterface.evalScript ("myFunc (" "+ ack +" ")");

  • To access the bindItems returns the undefined value

    Hello

    I'm trying to access the string representing the expression SOM associated with dynamic properties for a drop-down list by using script.

    Looking at the xml source I see the bindItems element with attributes in ref, labelRef and valueRef.

    I thought I'd try to access these values for a particular DropDown in the script editor would be:

    DropDown.bindItems.ref

    or something similar, but an exception is thrown that DropDown.bindItems is not defined.

    Any help would be greatly appreciated.

    Thank you.

    Kyle

    Hi Kyle,.

    I don't know what is the boss, some seem to work some don't. But you can work around it by using one of the following methods.

    . REF DropDown ["#bindItems"]

    DropDown.resolveNode('#bindItems').ref

    Good luck

    Bruce

  • How can you specify the default value for the undefined array elements

    According to aid LV, the tables have two default values, the normal default value and the default value for the undefined array elements.

    I assume that there must be a way to specify the default value for later, but I can't find it anywhere.  Any ideas?

    I know that you can drag the item out of the table container.  Change the default value on this scalar element.  Then drag the item in table tank.

  • Returns the time value zero calendar

    Hi, I write code with calendar that return the value zero for HOUR_OF_DAY and MINUTE when I run this code in Strom2(9550-5.0.0.334) below.

    Calendar calendar = Calendar.GetInstance ();
    Date date = new Date (this.arrivalTimeField.getDate ());
    calendar.setTime (date);
    Day int = calendar.get (Calendar.HOUR_OF_DAY);
    int minute = calendar.get (Calendar.MINUTE);

    So please help me for this problem and thanks in advanced

    I had a lot of problems like myself.  Invariably, I find that the bug is my code.  Usually, it is not difficult to find using the appropriate debug or SimpleDateFormat (because times are difficult to interpret, it is good to let the system do it for you!).  I suggest you do the same thing here.

    If you find that the system does not have it that you wait, then give us the details, for example, give us the long value that you provide to the calendar and the time you go out. You should be able to do it in two or three lines, just using the standard Java RIM (i.e. None of your classes).  You can also indicate the time zone that you are testing in.

  • Do stuff to PL/SQl that returns the value and redirect to modal page by setting this value

    Hello

    a button click Page1 I would perform a PL/SQL procedure that returns a value in P1_ITEMVAL and then redirect to a page 2 (modal page) and the value of an item on this page with the value previously returned. To do the same thing with a normal page is quite easy:

    Button action is present, then process of PL/SQL that returns the value in the P1_ITEMVAL element and, finally, a branch at page 2 that sets P2_ITEMVAL with P1_ITEMVAL. I really have no idea how to do the same thing when the target is a modal page.

    I created a unit test on https://apex.oracle.com/pls/apex (application 1554 - redir_to_modal)

    Workspace: tests

    USER: supporter

    PWD: supporter1234

    Any help would be much appreciated.

    Kind regards

    Pavel

    Pavel

    If you prepare a URL using the value calculated in the PLSQL of DA part you can then use a subsequent stage of javascript to set the location of the window.

    This will jump to the top of the page of the modal dialog box

    : P1_URL: = apex_util.prepare_url)

    ' f ? p ='|| : APP_ID - Application id

    |': 2' - Page id

    ||': ' || : APP_SESSION - Session id

    ||':'                      -- Request

    ||':NO'                    -- Debug

    : ': ' - Clear Cache

    : ': ' - Settings

    ||' P2_ITEMVAL'

    : ': ' - Parameter values

    || (: P1_ITEMVAL);

    then in the action of javascript

    Window.Location.Replace ($v ('P1_URL'));

    Hope this is of some use

    Concerning

    Kelvin

  • List of input values (multi-column) must return the output text once the value is selected

    Hello

    I am trying to achieve conditional:

    I create a searchVO(select '' empNumber from dual) - to accept the input value (name empNumber).

    I create empLovVO (select enum,ename, addr, city of emp). lov attached to empNumber (searchVO).

    In the list of values when I select a value (emp 1, a, xyz, abc), it must return the default aby associated with emp values 1 to my output texts

    the name of the EMP one.

    addr xyz

    City abc

    It should also automatically change the values if I select another empNumber.

    Please let me know how to achieve this.


    Thank you

    Firstly, for the searchVO, add a three other attributes, name, address, and City, the type of string:

    and make sure they are still editable:

    Then, you're mapped LOV enum attribute EmpNumber, right?

    Do similar for the newly created attributes, in the list of values dialog box validation:

    Ename--> name,

    --> addr addr,

    City--> City

    Then, just to show these attributes in the form of output text, and you'll get what you want...

  • DBMS_CRYPTO. HASH returns the value encrypted letters

    Hi all

    SE 12.1

    I'm using dbms_crypto. Hash to encrypt the values. But encrypted the returned string is at the top of the case. Calling WebService Im externally requires the proper case...  I've seen other ciphers (java-based) hash functions that seem to properly encrypt with a mixture of cases, what I need.

    Is it possible to return the string that is encrypted in the proper case.

    DECLARE

    l_ccn_raw RAW (128);

    BEGIN

    l_ccn_raw: = utl_raw.cast_to_raw('1234');

    l_ccn_raw: = dbms_crypto.hash (l_ccn_raw, dbms_crypto.hash_sh256);

    dbms_output.put_line (' TOKEN: ' |) ( l_ccn_raw) ;

    END;

    You can always try dbms_output.put_line (' TOKEN: ': bass (l_ccn_raw));

    But are you sure that you don't need a hashvalue base64-coded?

    dbms_output.put_line (' TOKEN: ' | utl_raw.cast_to_varchar2 (utl_encode.base64_encode (l_ccn_raw)));

  • GetCurrentRow returns the null value while trying to values defined in table advanced VO

    Hi all

    I'm trying to set default values to a bean advanced table according to the selection of LOV in another region. Here is the code and getCurrentRow returns the value null and null pointer exception is throwed. Please let me know where Iam going bad.

       if (pageContext. ) isLovEvent ())

    LovInputSourceId = string pageContext. getLovInputSourceId ();

       if ("poNumber". ) is equal to ()lovInputSourceId))

    pageContext . putDialogMessage (new OAException()"inside Onclick"));

    OAViewObject VO = (OAViewObject) am . findViewObject ()"L3APNonprojbasedpoVO1");

    VO1 OAViewObject = (OAViewObject) am . findViewObject ()"L3APCodingInfoEOVO1");

      VO . setWhereClause (null);

      VO . setWhereClauseParams (null);

      VO . executeQuery ();

      VO1 . setWhereClause (null);

      VO1 . setWhereClauseParams (null);

      VO1 . setWhereClause ("1=2");

      VO1 . executeQuery ();

       if (null! = VO )

       Row ReqRow = (Row) VO.first();  

       if (null ! = ReqRow )

       int idx = VO . getRowCount ();

       for (int xx = 0; xx < idx ; xx ++)

    String Description = (String)VO. getCurrentRow (). getAttribute ()"ItemDescription");

       Number Amount = (Number)VO. getCurrentRow (). getAttribute ("Amount");

       String Company = (String)VO. getCurrentRow (). getAttribute ("Company");

    String ProfitCenter = (String)VO. getCurrentRow (). getAttribute ()'ProfitCenter');

       String Dept = (String)VO. getCurrentRow (). getAttribute ("Dept");

       String Lob = (String)VO. getCurrentRow (). getAttribute ("Lob");

       String Account = (String)VO. getCurrentRow (). getAttribute ("Account");

    pageContext . putDialogMessage (new OAException()"inside loops'));

       if (null! = VO1 )

      { am. invokeMethod ("createRow");

    VO1 . getCurrentRow (). setAttribute ()'Description',Description);

      VO1 . getCurrentRow (). setAttribute ("Amount",Amount);

      VO1 . getCurrentRow (). setAttribute ("Company",Company);

      } ReqRow = (Row)VO.next(); }

       else {}

    }

    }

    Here is the method in AM.

    Public Sub createRow()
    {

    OAViewObject vo = (OAViewObject) getL3APCodingProjectEOVO1 ();

    vo.clearCache ();

    If (!) VO.isPreparedForExecution ())
    {
    System.out.println ("project VO executed");
    vo.setWhereClause (null);
    vo.setWhereClauseParams (null);
    vo.setWhereClause ("1 = 2");
    vo.executeQuery ();
    }
    Line = vo.createRow ();
    vo.insertRow (row);
    row.setNewRowState (Row.STATUS_INITIALIZED);

    }

    I modified your code a bit. This code does not require a method of AM.

    If the problem still not solved.

    If you want you can try this and let us know what happens.

    if (pageContext.isLovEvent())
    {
       String lovInputSourceId = pageContext.getLovInputSourceId();
       if("poNumber".equals(lovInputSourceId))
      {
      pageContext.putDialogMessage(new OAException("Inside Onclick"));
      OAViewObject VO=(OAViewObject)am.findViewObject("L3APNonprojbasedpoVO1");
      OAViewObject VO1=(OAViewObject)am.findViewObject("L3APCodingInfoEOVO1");
      VO.setWhereClause(null);
      VO.setWhereClauseParams(null);
      VO.executeQuery();
    
      VO1.setWhereClause(null);
      VO1.setWhereClauseParams(null);
      VO1.setWhereClause("1=2");
      VO1.executeQuery();
    
      if (VO != null)
      {
      for( Row ReqRow = (Row) VO.first();  ReqRow != null; ReqRow = (Row) VO.next())
      {
      String Description = (String)ReqRow.getAttribute("ItemDescription");
      Number Amount = (Number)ReqRow.getAttribute("Amount");
      String Company = (String)ReqRow.getAttribute("Company");
      String ProfitCenter = (String)ReqRow.getAttribute("ProfitCenter");
      String Dept = (String)ReqRow.getAttribute("Dept");
      String Lob = (String)ReqRow.getAttribute("Lob");
      String Account = (String)ReqRow.getAttribute("Account");
      pageContext.putDialogMessage(new OAException("Inside for Loop"));
    
      if (VO1 != null)
      {
      Row newRow  = VO1.createRow();
      newRow.setAttribute("Description",Description);
      newRow.setAttribute("Amount",Amount);
      newRow.setAttribute("Company",Company);
      VO1.insertRow(newRow);
      }
      }
      }
      }
    }
    

    See you soon

    AJ

  • Returns the value of column line

    Greetings!  I currently have a request we will tell

    SELECT value, period FROM MAS_CFUS_KEYACM_CONTROLDATA ORDER BY cf_keyword_ID

    RESULTS

    Period value

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

    100.0002 1 JANUARY 14

    -35.68 1 DECEMBER 14

    -1943.67 NOVEMBER 1, 14

    678.0013 OCTOBER 1, 14

    This continues for about 15 results by cf_keyword_ID.

    I'm looking to return the VALUE first in a new column called PREV1, the second value of PREV2, third in PREV3 and so on.  The same goes for the dates.  And all this for only the first 10 values of each cf_keyword_ID.  Can anyone suggest the best way to achieve this?

    Thank you!!

    Hello

    This is called pivoting.  Because I don't have a copy of your table test, I'll use scott.emp to illustrate.

    This shows the first 3 employees for each job, in order by hiredate, along with their hiredates:

    WITH relevant_data AS

    (

    SELECT ename, job, hiredate

    row_number () taken OVER (PARTITION OF work

    ORDER BY hiredate

    ) AS r_num

    FROM scott.emp

    )

    SELECT *.

    OF relevant_data

    PIVOT (MIN (ename) AS ename

    MIN (hiredate) AS hiredate

    FOR r_num (1, 2, 3)

    )

    ORDER BY job

    ;

    Output:

    WORK 1_ENAME 1_HIREDATE 2_ENAME 2_HIREDATE 3_ENAME 3_HIREDATE

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

    ANALYST FORD 3 December 1981 SCOTT April 19, 1987

    The CLERK SMITH December 17, 1980, 3 December 1981 JAMES MILLER January 23, 1982

    MANAGER JONES 2 April 1981 BLAKE 1 May 1981 CLARK June 9, 1981

    PRESIDENT KING November 17, 1981

    SELLER ALLEN 20 February 1981 WARD 22 February 1981 TURNER 08-Sep-1981

    There are actually more than 3 SECRETARIES and SALESMEN.  Which does not cause an error; the only first 3 are shown.

    As you can see, having less of 3 does not cause any errors, either.

    For more info on pivots, see the FAQ of the Forum:

    Re: 4. How can I convert rows to columns?

    I hope that answers your question.

    If this isn't the case, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.

    Explain, using specific examples, how you get these results from these data.

    If yod post rather a problem using scott.emp, then you need not display the sample data; just results and explanations.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum:

    Re: 2. How can I ask a question in the forums?

  • fatal error when installing master collection '[FATAL] installation - installation package error C:\Users\Desktop\MasterCollection_CS6_LS6\packages\core\PDApp.pimx. Returns the value of pim_installPackage = - 1

    Hello

    When I try to install a trial like photoshop cs6 or master collection cs6 product, I get the error "Installer has not initialized. I used Adobe cleaner to remove all products cs6 and tried again, but no luck, same error.

    I opened the log file and find this line:

    [FATAL] Setup error - installation package C:\Users\moshe-a\Desktop\MasterCollection_CS6_LS6\packages\core\PDApp.pimx.

    Returns the value of pim_installPackage = - 1

    No idea how to fix?

    Thank you, Momu

    start at the top and work your way down to apply applicable patches until your problem is solved.

    If (win) cc: https://helpx.adobe.com/creative-cloud/kb/creative-cloud-desktop-application-failed.html

    If your error is:

    "Setup failed to initialize. File not found. ' or 'could not initialize installation. This could be due to missing files.

    first of all, rename folder OOBE OOBE.old.

    to find the OOBE:

    Win 64 bit OS: Program Files x86\Common Files\Adobe\OOBE

    Win 32 bit OS: Program Files \Common Files\Adobe\OOBE

    Mac os: HD > library > application support of > adobe > caps

    Mac os: USER > library > application support of > adobe > OOB

    If it fails or isn't the exact error you see, uninstall, clean (http://www.adobe.com/support/contact/cscleanertool.html) and reinstall.

    If you use an installation dvd:

    Copy the contents of the drive in a desktop folder and install from this directory.

    If you are using a mac:

    1. try to create a new user account in Mac with administrator privileges.

    2. connect to the new user, navigate to Mac HD > Application > utilities > Adobe Installer folder, locate products such as Adobe Reader, Adobe Flash, Adobe Air and uninstall the

    3. navigate to the user library > Application Support > Adobe and Adobe put in the trash.

    4. navigate to Mac HD > library > Application Support > Adobe and Adobe put in the trash.

    5 restart the installation.

    If everything is applicable above fails, check your Setup logs:

    http://helpx.Adobe.com/Photoshop-elements/KB/troubleshoot-install-using-logs-elements.html

  • Returns the lowest value of two fields

    Hello

    I have two domains that users manually enter in a form.  Value1 and Value2.

    Someone at - it suggestions on the best way to use JavaScript to return the lowest value of the two fields?

    Thank you

    Natalie

    I think I misunderstood what you mean by any, I thought you wanted the calculated value to be None. The two fields value digital formats and modify the script for:

    Custom calculate script

    (function () {}

    Initialize the array

    aNums var = [];

    Get the field values as strings

    var s1 = getField("Value1").valueAsString;

    var S2 = getField("Value2").valueAsString;

    Convert values to numbers if not empty and add to the table

    If aNums.push(+s1) (s1);

    If aNums.push(+s2) (s2);

    Set the value of this lesser field of entries

    If both are blank, this field blank

    Event.Value = aNums.length? Math.min.Apply (null, aNums);:

    })();

  • XML - ORA-19025: EXTRACTVALUE returns the value of a single node

    Hello

    I'm new to XML DB. Can someone help me with the below XML

    I use the following XML... (I pasted a part only of it coz I need data only up to this article)

    XML
    --------------------

    <? XML version = "1.0" encoding = "UTF-8"? > < SOAP - ENV:Envelope xmlns:SOAP - ENV = "http://schemas.xmlsoap.org/soap/envelope/" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-."
    example"container ="http://www.w3.org/2001/XMLSchema"> < SOAP - ENV:Body >
    < ns:PicklistWS_GetPicklistValues_Output xmlns:ns = "urn: crmondemand/ws/list dropdown /" >
    < ListOfParentPicklistValue xmlns = "urn: / xml/crmondemand/list of choices" >
    < ParentPicklistValue >
    < language > ENU < / language >
    < ParentFieldName > plProduct_Team < / ParentFieldName >
    < ParentDisplayValue > Marketing On Demand < / ParentDisplayValue >
    < ParentCode > Marketing On Demand < / ParentCode >
    < Disabled > N < / disabled >
    < ListOfPicklistValue >
    < PicklistValue >
    Escalation of OCP/SME < code > < code >
    Escalation of OCP/SME < DisplayValue > < / DisplayValue >
    < Disabled > N < / disabled >
    < / PicklistValue >
    < PicklistValue >
    Ask fusion < code > < code >
    Merge request < DisplayValue > < / DisplayValue >
    < Disabled > N < / disabled >
    < / PicklistValue >



    Code
    ---------




    SELECT distinct
    EXTRACTVALUE (value (SR), ' / ParentPicklistValue/ListOfPicklistValue/PicklistValue/Code ','xmlns = "urn: / crmondemand/xml/list of choices"') AS display.
    Return EXTRACTVALUE (value (SR),'/ ParentPicklistValue/ListOfPicklistValue/PicklistValue/DisplayValue ',' xmlns = "urn: / crmondemand/XML/picklist"'),.
    EXTRACTVALUE (value (SR), '/ ParentPicklistValue/ParentDisplayValue','xmlns = "urn: / crmondemand/XML/picklist"') AS parent_display,
    EXTRACTVALUE (value (SR), '/ ParentPicklistValue/ParentCode','xmlns = "urn: / crmondemand/XML/picklist"') AS parent_return
    TABLE (XMLSEQUENCE ((EXCERPT)
    WEB_SERVICE (' <? xml version = "1.0" encoding = "UTF - 8" standalone = "no"? > < envelope soap: xmlns:soap = "http://schemas.xmlsoap.org/soap/envelope/")
    xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" container = "http://www.w3.org/2001/XMLSchema" >
    < soap: Body >
    < PicklistWS_GetPicklistValues_Input xmlns = "urn: crmondemand/ws/list dropdown /" >
    Type < FieldName > < / FieldName >
    Service request < RecordType > < / RecordType >
    < / PicklistWS_GetPicklistValues_Input >
    < / soap: Body >
    "< / envelope soap: >.
    (' document / urn: crmondemand/ws/list dropdown /: ' GetPicklistValues, Id_de_la_session).
    "/: soap envelope / soap: Body / * / * / * ',' xmlns:soap ="(http://schemas.xmlsoap.org/soap/envelope/'))) SR "


    ERROR
    ---------

    ORA-19025: EXTRACTVALUE returns the value of a single node


    UNDERSTANDING
    ---------------------------

    As my Xpath only points until the node - ParentPicklistValue and not the child nodes under it. That's why, when I try to interview the child nodes - / ParentPicklistValue/ListOfPicklistValue/PicklistValue/Code, I get the error mentioned above.

    REQUIREMENT
    -----------------------

    Can someone help me to receive the values of the mother and child values based on xml and query above.

    Hello

    It's a classic ;)

    You need a second XMLSequence who shreds the collection of PicklistValue in relational lines:

    select extractvalue(value(sr2), '/PicklistValue/Code', 'xmlns="urn:/crmondemand/xml/picklist"') AS Display
         , extractvalue(value(sr2), '/PicklistValue/DisplayValue', 'xmlns="urn:/crmondemand/xml/picklist"') AS Return
         , extractvalue(value(sr1), '/ParentPicklistValue/ParentDisplayValue', 'xmlns="urn:/crmondemand/xml/picklist"') AS parent_display
         , extractvalue(value(sr1), '/ParentPicklistValue/ParentCode', 'xmlns="urn:/crmondemand/xml/picklist"') AS parent_return
    from table(
           xmlsequence(
             extract( WEB_SERVICE( ... )
                    , '/soap:Envelope/soap:Body/ns:PicklistWS_GetPicklistValues_Output/ListOfParentPicklistValue/ParentPicklistValue'
                    , 'xmlns="urn:/crmondemand/xml/picklist"
                       xmlns:ns="urn:crmondemand/ws/picklist/"
                       xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"' )
           )
         ) sr1
       , table(
           xmlsequence(
             extract( value(sr1)
                    , '/ParentPicklistValue/ListOfPicklistValue/PicklistValue'
                    , 'xmlns="urn:/crmondemand/xml/picklist"' )
           )
         ) sr2
    ;
    

    What is your version of the database BTW?
    10.2 and upward, you can use the XMLTable.

Maybe you are looking for

  • When you access my email on Comcast home page I can't leave the email preview page.

    I open the Firefox browser and my home page opens as (My Comcast) which is normal. I opened my email on this page and the preview page opens automatically for access to e-mail, voicemail, etc. At this point, I can't get back or whatever it is access

  • W550s touch screen comes with a protective film?

    So I just got the W550s with the touch screen. I noticed that the surface of the matte screen is actually a plastic film. (You can tell the cutting around the camera and microphone) 0) this is a plastic film? (1) do this movie comes off as protective

  • Impossible to install any updates from Windows

    I run Vista, SP1, 32 bit OS.  I could not successfully install an update of windows for a long time. I disabled the auto update because I had so many unsuccessful attempts Often I had to go back to a point files out of the reboot loop (configuration

  • Acer Tablet not known

    Someone at - he heard of an acer iconia 8 1A - 820model, because it seems that acer is not

  • DriverCure in my registry

    How can I delete my registry DriverCure. It was put there by a microsoft tech while fixing something else. It's a pain in the neck. Please... easy instructions for an old man to follow. Thank you