XML Data in Text Field Issue

LC ES 8.2.1.3
I have a web service that outputs XML data and Designer calls the webservice and the XML data populates a text field.  This works fine.
My problem is getting the data out of the text field to populate different fields in my form.  I have done many searches and have tried many different things but still can't get the data out.  I have made sure my form is dynamic xml.
Here is the last thing I have tried:
-------Begin Code -----------
Placed in testData:Intialize and the connectionSet is placed in Page1:Initialize.
var myXML = XMLData.parse(xmlData.rawValue, false);
var subNames = XMLData.applyXPath(myXML, "//Subordinates/Subordinate/full_name");
if (subNames == null) {
//no data
} else if (subNames.length == null) {
  //not array, just a single value
  topmostSubform.Page2.testData.addItem(subName.value);
  } else {
   for (var i = 0; i < subNames.length; i++) {
    topmostSubform.Page2.testData.addItem(subName.item(i).value);
-------End Code -----------
I have been working on this for 3 days and still can't get it to work.  The closest I have come is output in my testData text field that said "Object23485968".
Thank you in advance for your help
John

I must be missing something somewhere becuause I couldn't get it to work.  Here is the xml that I am getting back when I invoke the CFC from within Workbench.  This data is assigned to an XML type varialbe called 'xmlOutput'.  I then create a data connection in my form to the service I created in Workbench and bind the return data to a text field (with multiple lines).  When I bind the data I have the option to choose "document" or "element".  Element doesn't return anything, unless I am doing something wrong, so I have to choose Document. 
With the xmlOutput below I do get more than one subordinate returned.  I only showed one for simplicity.
------------Begin xmlOutput --------------  (Yes, I am getting all of these empty lines in my output)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://livecycle" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <ns1:getSubordinatesResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <getSubordinatesReturn xsi:type="xsd:string"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<subordinates>
    <subordinate>
        <cost_center_code>123456</cost_center_code>
        <cost_center_description>Business</cost_center_description>
        <department_code>99</department_code>
        <department_description>Information Technology</department_description>
        <department_head_emp_id>987654</department_head_emp_id>
        <employee_id>456789</employee_id>
        <first_name>John</first_name>
        <full_name>Public, John</full_name>
        <hourly_rate>5.350</hourly_rate>
        <job_code>PMBAPP</job_code>
        <job_title>Business</job_title>
        <last_name>Public</last_name>
        <lives_in_state>AK</lives_in_state>
        <location_code>ANCH</location_code>
        <location_description>Anchorage</location_description>
        <network_user_id>JPublic</network_user_id>
        <pay_group_code>KMH</pay_group_code>
        <rate_type_code>S</rate_type_code>
        <reports_to>789123</reports_to>
        <territory_code/>
        <tier>1</tier>
    </subordinate>
</subordinates
------------End xmlOutput --------------  (Yes, I am getting all of these empty lines in my output)
I am really at a loss on how to get this data into my form.
Thanks,
John

Similar Messages

  • Filter XML Data for Text Fields.

    Hi,
    I'm trying to display a single record out of an XML database
    into dynamic fields in my MovieClip. I need to be able return a
    single record based on the current time. Attached is a sample of my
    XML data.
    I was wondering if this could be acheived with a DataSet
    filterFunction? If it is possible, what code would I need to
    include?
    Finally, do I need to pass my full DataSet to an array or do
    I need to filter first & then pass to an array?
    Thankyou.
    Elton Bernardson.

    There's a pattern that almost every wpf dveloper uses and it's called mvvm.
    Google it, there'll be a shed load of articles.
    It's a passive view pattern in that the view has minimal logic in it.
    The view is your window ( or usercontrol).
    You can add a listboxitem to the listbox.items collection but i would only do  that if it's a very simple static collection.
    You can bind a collection to itemssource and the listbox will create a listboxitem for each things it gets from that collection.
    It creates them using a datatemplate.
    When you do that binding apparently directly to a collection a collectionvie is automagically created between control and collection.
    You can explicitly create one of those collectionview things yourself and this is agreat way to filter and sort.
    You can also use one of those collectionviews to navigate the collection setting the current item in the viewmodel.
    That can be synced in the view so you select an item from the viewmodel.
    I think I probably drifted off topic there somewhat.
    Mvvm is probably different from stuff you've done before.
    It's easier to do a bunch of things using mvvm plus it's what any prospective employer will want.
    Along with tdd/bdd it's industry standard.
    Big tip: learn it.
    You want to avoid showing a user a huge load of data. Not so much for performance reasons but because users can only cope with so much data at a time.
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • Problem with Refreshing the data bound text fields

    Folks,
    First of all, this a GREAT product and I am moving my apps from Eclipse to Studio Creator. I am very impessed with it so far.
    I am gone through most tutorials, but can't help resolve the problem that I am having. I have a page, that lists all the users in a table. When you click on any user, it opens up another page that lists the detail of the specific user you have clicked on. This a typical use in most web applications, right?
    In the user detail page, I open it in "Read" only mode, by setting the "setReadOnly" to true for all text field components. Then users can edit it by clicking "Edit" button. Edit button just changes the "setReadOnly" to false, to allow editing. After editing, they can hit the "Save" button to save the changes. In the save button, I call this code:
    public void prerender() {
            try {
                userID=getSessionBean1().getUserID();
                getSessionBean1().getWeb_userRowSetUserDetail().setObject(1,userID);
                getWeb_userDataProviderUserDetail().refresh();
                info("prerender: Refresh called");
            } catch (Exception ex) {
                error("Error in userForm.prerender():"+ex.getMessage()+ex.getStackTrace());
                log("Error in userForm.prerender():", ex);
            setReadWrite();
    public String btnSave_action() {
            try {
                getWeb_userDataProviderUserDetail().commitChanges();
                getWeb_userDataProviderUserDetail().refresh();
                info("Data Provider Refreshed in SAVE");
                _readOnly=true;
                form1.discardSubmittedValues("saveVForm");
                info("User Updated New:"+userID);
            } catch (Exception ex) {
                log("Error Description", ex);
            return null;
        public String btnEdit_action() {
            try {
                _readOnly=false;
                //info("User ID Edt="+getSessionBean1().getUserID());
            } catch (Exception ex) {
                error("Error in userForm.btnEdit_action:"+ex.getMessage()+ex.getStackTrace());
                log("Error in userForm.btnEdit_action():", ex);
            return null;
        private void setReadWrite(){
            // Set read-only to true or false for all text fiels
            this.btnEdit.setVisible(_readOnly);
            this.btnSave.setVisible(!_readOnly);
            this.user_id.setReadOnly(_readOnly);
            this.user_email_client.setReadOnly(_readOnly);
            this.user_email_office.setReadOnly(_readOnly);
            this.user_fname.setReadOnly(_readOnly);
            this.user_lname.setReadOnly(_readOnly);
            this.user_id.setReadOnly(_readOnly);
            this.user_password.setReadOnly(_readOnly);
            this.user_password_conf.setReadOnly(_readOnly);
            this.user_phone_cell.setReadOnly(_readOnly);
            this.user_phone_cell_aac.setReadOnly(_readOnly);
            this.user_phone_client.setReadOnly(_readOnly);
            this.user_phone_home.setReadOnly(_readOnly);
            this.user_phone_office.setReadOnly(_readOnly);
        }When the save button is clicked, the database is updated (as I can verify by looking directly into the database), but the data-bound text fields do not display the new value. YES, I am calling refresh() on data provider? I tried to call refresh in both "preRender()" and "Save" button action event, but that did not help either.
    Please note that the save button also changes the "setReadOnly" back to TRUE for all text fields. That means, users view the page in Read-Only mode after saving. (They have to click on "Edit" button again to edit it). I discovered that if I do not set the text field components in "ReadOnly" mode, then they display the updated value of the fields. But if I change setReadOnly to TRUE, then they display the old values (before the save).
    Any idea what I am doing wrong here?
    Thanks

    Here is my experience with it. I have three text
    boxes to be filled out. They are part of a virtual
    form with an add button as the submit. You can fill
    out the 3 and add them and a node is added to a tree
    component. When you click on a node in the tree
    component (the submit to another virtual form that
    the 3 buttons participate in) the text fields should
    be loaded with the values that they where added with.Hard to tell from this explanation, but if the text fields do not participate in a virtual form, then they are not going to get updated when an action in the virtual form happens. Not sure this is your problem. Like I say, hard to tell from this explanation.
    They will not display the values though...having
    nothing to do with read only. If I disable them
    before hand...they display the updated values. If I
    set their value at the top or bottom of prerender,
    they display the change...if I set the value in an if
    conditional that is hit (I have checked many times)
    in prerender, they will not display the values. If I
    set them in the tree handler anywhere, they will not
    display the values. This is very frustrating and is
    wasting tons of my time...I simply want to load the
    text fields based on the tree node that was
    clicked...I have messed with this for hours and it
    certainly does not work.Well, setting them in the tree handler won't work because the tree handler gets called in the page instance that handles the submit and not the page instance that renders the response.
    Posting your prerender code might help. Also, your action handler.
    >
    >
    - Mark

  • Insert Date Using Text Field

    Hi,
    i have date item ,Can i insert date from text field in dd/mm/yy format.
    My Column for date is DATE type in table.
    How can i ido this with Text field .
    Thanks

    I think you want to have text field for user to input the date? (instead of date picker item type)
    If you are using custom PL/SQL code, it is fine, because you just use to_date(:Px_DATE_ITEM, 'dd/mm/yyyy'); or whatever format you are expecting, in your insert statement.
    If it is a DML process type, I don't think it's possible - apex probably converts the text from the data picker into a date datatype at run time, but not sure it'd do it when its just a text box.
    Ta,
    Trent
    Edited by: trent on Jan 28, 2011 10:57 PM
    I take that back. So long as you have specified the application date format in the globalization attributes, and the format in the text box is the same/valid (otherwise it must be in the format as specified in NLS_DATE_FORMAT), it will insert no trouble in a DML process. http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/bldr.htm#CHDBHCBB

  • Comparing Xml in a Text Field

    We have a Text field which saves Xml data (not too big, 20 to 40 lines usually), in one of the stored procedures, we are receiving the Xml, which needs to be either inserted or updated based on whether that record already exists in table or not. We are doing
    that match based on other non-xml fields but in one case we don't have any other option but to compare xml, so here is my question.
    What's the most performance efficient way to compare Xml (which is passed as input parameter to SP as Text) to the one already saved in Table as Text? We are running Sql 2005.
    Thanks
    Syed

    Hi Syed_Sajid,
    Regarding your description, are you looking for approach to compare xml structured TEXT fields? If so, you can reference the below sample.
    DECLARE @Tab TABLE(id INT, content TEXT)
    INSERT INTO @Tab SELECT 1,'<catalog>
    <book>
    <author>Gambardella, Matthew</author>
    <title>XML Developer''s Guide</title>
    <genre>Computer</genre>
    <price>44.95</price>
    <publish_date>2000-10-01</publish_date>
    <description>An in-depth look at creating applications
    with XML.</description>
    </book>
    </catalog>'
    DECLARE @XML1 XML,@XML2 XML;
    SELECT @XML2= content FROM @Tab WHERE id=1
    SET @XML1 = '<catalog><book>
    <author>Corets, Eva</author>
    <title>Maeve Ascendant</title>
    <genre>Fantasy</genre>
    <price>5.95</price>
    <publish_date>2000-11-17</publish_date>
    <description>After the collapse of a nanotechnology
    society in England, the young survivors lay the
    foundation for a new society.</description>
    <extra>a</extra>
    </book>
    </catalog>'
    ;WITH XML1 AS
    SELECT T.N.value('local-name(.)', 'nvarchar(max)') AS NodeName,
    T.N.value('.', 'nvarchar(max)') AS Value
    FROM @XML1.nodes('/catalog/book/*') AS T(N)
    XML2 AS
    SELECT T.N.value('local-name(.)', 'nvarchar(max)') AS NodeName,
    T.N.value('.', 'nvarchar(max)') AS Value
    FROM @XML2.nodes('/catalog/book/*') AS T(N)
    SELECT ISNULL(XML1.NodeName, XML2.NodeName) AS NodeName,
    XML1.Value AS Value1,
    XML2.Value AS Value2
    FROM XML1
    FULL outer join XML2
    ON XML1.NodeName = XML2.NodeName
    WHERE ISNULL(XML1.Value, '') <> ISNULL(XML2.Value, '')
    The different nodes between two xmls will be listed in the result above.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • XML import into floating fields issue

    Probably missing something obvious, but my searches are coming up blank.  Here's the workflow I'm shooting for:<br /><br />-Create form1 in LCD<br />-User fills out form and submits via email the XML data<br />-Create form2 in LCD that uses floating text fields to create a dynamic text document based on the info in form1<br />-Import XML data from form1 into form2<br />-Print form2<br /><br />Most of it works, but there is a subform on form1 that form2 doesn't import the data from.<br /><br />The XML winds up like this:<br /><variable1>Variable 1 Info</variable1><br /><variable2>Variable 2 Info</variable2><br /><subform><br /><variable3>Variable 3 Info</variable3><br /><variable4>Variable 4 Info</variable4><br /></subform><br /><br />In this example, form2 properly imports variable1 and variable2, but ignores variable3 and variable4.  Manually removing the <subform> tags yields the desired result.<br /><br />Something in the text field binding in form2, maybe?<br /><br />Thanks in advance,<br />SyddyS

    The answer appears to lie in the hierarchy and naming. All forms, pages, subforms, etc. have to be named exactly the same and have the same hierarchical flow for the floating text fields to bind properly to imported data. This kind of blows for my purposes, as "form2" had my text fields spread across multiple pages and multiple subforms. Naming all the subforms the same as the subform in "form1" made the first one work, but none of the subsequent.
    If anyone has any alternative thoughts, I'd appreciate it. My workaround is to put ALL of my text fields in form1 on the same level, and then call them out one by one in the scripting to make the ones I want visible or hidden. Wrapping them in a subform just causes too much trouble down the line. Ugly, but functional.
    Thanks,
    SyddyS

  • Tree component and loading xml files into text field

    Hello and thank you for taking the time to read my issue....
    I am making a simple self help application.  I have a tree component that loads the different catagories and topics for my help app dynamically via an xml file...no issues there.
    I then want it so that when the user cliecks on the actual topic that the TextArea component will load the info from another xml file using the name of the topic as the name of the xml file to make it that much easier for anyone to maintain this program.
    So far the code i have is this.
    myTreeListener.change = function(eventObject)
        var theSelectedNode = eventObject.target.selectedNode;
        var theSelectedNodeLabel = theSelectedNode.attributes.label;
        topicTextArea.text +=
    I am a little fuzzy when it comes to loading the xml file in.  Should i be loading html instead of xml is my other question as well?
    Thanks in advance for your help
    FG

    Check out the Oracle XDB Developer's Guide, Chapter 3. There is an example of using BFileName function to load the xml files from a directory object created using create or replace directory. It works really well.
    Ben

  • Text field issue in Sub Form

    Hello Experts,
    I am creating my very first Adobe Form for my client. I have created a subform with "Flowed" content. I have one Text Field in that sub form. When I try to place the second Text Field adjacent to that, it's not letting me do that. It's placing the Text Field under the first one. Can you please let me know how to overcome this issue?
    Thanks a lot for your help. I did search and could not find any solution for this.
    Also, I tried to change the position manually, but the X: and Y: positions are greyed out for me in Layout pallette.
    Edited by: sam jose on Apr 28, 2011 6:04 PM

    Hi sam,
    When you have selected the sunform to be "flowed" , there is an adjacent field where you mention the typr of flow - 'Top to bottom ' or 'Western text' . If you specify as 'western text' then you could get the desired result. you can use rectangles etc for any alignment based on your layout requirement.
    Soha.

  • Adding current date to text field w/ Javascript in Acrobat 8

    I am trying to add the current date to a text field using javascript in Acrobat 8 Professional. I am using the util.printd function in a javascript function but the date of creation shows in the text field, NOT today's date. Any clues??
    var f = this.getField("myField");
    if (!f.value) f.value = util.printd ("m/d/yyyy", new Date());

    Thanks. I've used it also without the empty value check and had the same result of showing the creation date and not the current date.

  • Populate data in text field

    Hi all,
    I am a bit confused here. In my page I have three text boxes, they are - P10_YEAR, P10_MONTH, P10_TOTAL. I am using LOV for year and months field. LOV is like for year 2000;2000, 2001;2001 and for month June;June,July;July and so on. Month field is set to textbox with submit.
    So I want to retrieve the data in the P10_TOTAL when user select the month. Interestingly it always return 0 but it should be more than that. I have set the Source for P10_TOTAL as PL/SQL Expression *0=( SELECT count(*) from rtv_metro_count where record_month=:P10_month);* but it does not work. However it does work in toad and sql query. I have tried to change the expression to SQL query but did not work either.
    Is there any other way, I can do this task, retrieve data from table in a specific text field? Please provide your suggestions.
    Thanks in advanced.
    Tajuddin

    Create a page process - on Submit using the following code:
    DECLARE
    v_count NUMBER;
    BEGIN
    SELECT COUNT (*)
    INTO v_count
    FROM rtv_metro_count
    WHERE record_month = :p10_month;
    :p10_total := v_count;
    END;
    and remove the pages source by setting it to static assignement - only when current value in session state is null.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Date  in text field

    Hi,
    I have a text field :P1_DATE . I want to enter date into it and date can be in any format like 01102012 means 01/10/2012 .if i enter date like 01102012 this should be enter like a date in table as date column accept.when i edit to the record date should be display like 01102012.
    Thanks & Regards
    Vedant

    Dear Friend,
    i have created two region.1st region have some item .using these item i have created invoice header.after creaing invoice header i have added no of line w.r.t invoice header.
    in 1st region i have take text item to enter invoice date it's data type is date type.
    in 2nd region which has created using tabular form here is i ma using one column invoice date.
    i want to display 1st region invoice date into tabular form invoice date column.so i have use item (application or page item) and pass :p1_invoice_date.
    i have use :p1_invoice_date as a text field but data type is date type date format is 'DDMMYY' and i am try to display it into tabular form invoice date column. it's also date type but i have display it as a text field and os i have put :p1_invoice_date into Tabular Form Element item default type (application or page item) .
    But it display me error
    report error:
    ORA-01790: expression must have same datatype as corresponding expressionHow to display 1st region invoice date into tabular form invoice date column.
    How can i do this.
    Thanks
    Edited by: Vedant on Oct 25, 2012 3:16 AM

  • Insert Current Date into text Field

    Hi I was wondering if anyone knows how to insert the current
    date into a text field using ASP.NET C# page. When the page loads.
    Or better still insert current date into my database when the
    page is updated. using the insert Server behavier.
    I would be very greatfull for any help.

    To assign it to a text box you couls use the following in the
    onload
    function
    textbox.Text = DateTime.Now.toString;
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "cantmakeitwork" <[email protected]> wrote
    in message
    news:e9qhrv$crd$[email protected]..
    > Hi I was wondering if anyone knows how to insert the
    current date into a
    > text
    > field using ASP.NET C# page. When the page loads.
    >
    > Or better still insert current date into my database
    when the page is
    > updated.
    > using the insert Server behavier.
    >
    > I would be very greatfull for any help.
    >

  • How do I auto populate the date into text fields when form is first opened?

    Hello,
    I read all about the changing the scripts but its not really working for me. I was hoping someone could help me with directions on how to auto populate the date into designated text fields when my adobe document is first opened?
    I am working in Adobe Acrobat 9.
    Thank you,
    Sheri

    When you add a new document JavaScript (Advanced > Document Processing > Document JavaScripts > Script Name (enter something) > Add), you will be given a function skeleton by default. Just delete it and enter the line of code I showed above. Now, whenever the document is opened, the code will get triggered and the field will be updated with the current date. There is no "Document Open" action (at least that's accessible via Acrobat's UI), but this is effectively the same thing since any document-level JavaScripts are executed when the document is opened.

  • Need help displaying data in text field... Help?

    i have this code:
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.Event;
    import com.adobe.serialization.json.JSON;
    var loader:URLLoader = new URLLoader(new URLRequest("https://api.twitter.com/1/statuses/user_timeline.json?screen_name=ScottMitchell"));
    loader.addEventListener(Event.COMPLETE, loadComplete);
    function loadComplete(e:Event):void {
        processData(e.target.data);
    function processData(data:String):void {
        var tweets:Array = JSON.decode(data) as Array;
        trace(tweets[0].text);
    It works, in the output it tells me the tweets.
    but i need it to be displyed on the app, i need to no how to do this, someone pointed me in the direction of using a item renderer extended from sprite?
    But really all i need to do is display it in a text field, all i want to do is display the data.
    Can anyone help???
    I know this is probably simple and i did try to figure this out on my own, but had no luck.
    All help is appreciated.
    Many thanks in advance.

    you can always use an array if there's no pattern to your positions:
    var positionA:Array=[ [100,20], [2,222], [55,2], [201,111], [78,23] ];
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.Event;
    import com.adobe.serialization.json.JSON;
    var loader:URLLoader = new URLLoader(new URLRequest("https://api.twitter.com/1/statuses/user_timeline.json?screen_name=ScottMitchell"));
    loader.addEventListener(Event.COMPLETE, loadComplete);
    function loadComplete(e:Event):void {
        processData(e.target.data);
    function processData(data:String):void {
        var tweets:Array = JSON.decode(data) as Array;
    for(var i:int=0;i<5;i++){
    var tf:TextField=new TextField();
    addChild(tf);
    tf.multiline=true;
    tf.width=300;
    tf.text =   tweets[i].text;
    tf.autoSize="left";
    tf.x=positionA[i][0];
    tf.y=positionA[i][1];
    nextY+=tf.height;

  • Adobe CS 5.5 Text Field Issues

    In Adobe Flash CS5.5 is having a major issue related to text field, which is letter crashing and line crashing if the font is Arial 12 points. (most of the letters are ok mainly the problem with the letters "a","l","i" "m". if the word is "health" where there will have more gap between letters e and a and there is no gap between a and l. any solution for this?

    embed your font.

Maybe you are looking for

  • Is there any tool to check whether the proper data is inserting or not?

    Hi, We have different products A,B and C. whenever user crates an account under these products some X,Y,Z table gets updated. If user1 creates an account under A then X, Y, Z tables update with some data along with some ID If user2 creates an account

  • Safari wont open hotmail or microsoft sites

    Ive only got my internet working today. When i first connected i was able to go on hotmail and managed to download microsoft messenger. However it now wont let me go on, it seems, any microsoft site (still connects to msn messenger fine though). I re

  • Color a single cell in ALV using OO

    Dear Gurus , I tried to color a cell using OO in ALV but i can't . I think my code is correct but i can't find the problem ... Look my code please ... DATA: BEGIN OF ITAB OCCURS 0,            PERNR    LIKE PTRV_HEAD-PERNR,            ENAME    LIKE PA

  • Key value does not currently exist in the primary key table error

    Im testing out a form and creating a new insert once all the fields are filled in it wont allow me to move on and comes up with this error message; key value does not currently exist in the primary key table Is this becuase the form contains foriegn

  • Toshiba satellite L300D-01, system recovery not working.

    Yesterday I was just on my laptop then it just suddenly turned off, with a blue screen (that didnt stay on long enough for me to read) when i tried turning it back on it would go as far as the green bar loading, then a black screen, I tried waiting f