ResolveNodes doesn't find all nodes

Hi there,
I would like to find all text fields with a specific name in my form (and do things with them...).
Funny thing is: I sometimes get only one hit or no hits at all. I never managed to get the correct whole list of fields. Am I doing something wrong?
My code is (here in the form-ready event):
var arrayFields = xfa.resolveNodes("myField[*]");
if (arrayFields == null) {
    xfa.host.messageBox("nothing found");
else {
    xfa.host.messageBox(String("Number of Fields found: " + arrayFields.length));
    for (var iFieldCounter = 0; iFieldCounter < arrayFields.length; iFieldCounter++) {
        xfa.host.messageBox( arrayFields.item(iFieldCounter).somExpression);
    } // for iFieldCounter
} // else some result
PS. I have a little sample form ready. Yet I don't find a way to upload it to the forum.
Uli

[email protected] wrote:
As resolveNodes has an issue with returning objects located in subforms below $template.#subform.#subform[*], you're left with traversing the dom tree yourself.
Thanks for that information. Saved me from trying things for ever.
I wrote this function "resolveNodesFixed()" instead. Whoever has the same problem in the future may try it this way:
var arrayFields = resolveNodesFixed("myField");
if (arrayFields == null) {
    xfa.host.messageBox("nothing found");
else {
    xfa.host.messageBox(String("Number of Fields found: " + arrayFields.length));
    for (var iFieldCounter = 0; iFieldCounter < arrayFields.length; iFieldCounter++) {
        xfa.host.messageBox( arrayFields[iFieldCounter].somExpression);
    } // for iFieldCounter
} // else some result
function resolveNodesFixed(sObjectName) {
    // Finds all objects by the name of sObjectName starting from the top.
    // Parameters:
    //        sObjectName: Name of the searched for object
    // Result:
    //         returns an array of found objects. It may be empty.
    arrayHits = new Array();
    traverseForm(xfa.form, arrayHits, sObjectName);
    return arrayHits;
} // function resolveNodesFixed()
function traverseForm(oFormNode, arrayHits, sObjectName) {
    // runs thru all nodes of the form and adds every node with the name "sObjectName" to arrayHits
    // Parameters:
    //        oFormNode:   starting node. From this node downwards this function searches for nodes.
    //        arrayHits:   array to add the found nodes to
    //        sObjectName: Name of the searched for object
    // Result:
    //         returns true if everything is all right
    try {
        //xfa.host.messageBox(oFormNode.somExpression + " - " + oFormNode.nodes.length);
        for (var iIndexChildObject = 0; iIndexChildObject < oFormNode.nodes.length; ++iIndexChildObject) {
            var oChild = oFormNode.nodes.item(iIndexChildObject);
            if (oChild.name == sObjectName) {
                arrayHits.push(oChild);
            }  // if oChild.className == sObjectName
            if (oChild.isContainer) {
                // this node appears to be a subform. Recursivly we check this subform's sub nodes.
                traverseForm(oChild, arrayHits, sObjectName); // if the node contains subnodes make a recursive call to the function
            } // if oChild.isContainer
        } // for iIndexChildObject
    } // try
    catch (e) {
      console.println("Error: " + e);
      return false;
    } // catch
    return true;
} // function traverseForm()

Similar Messages

  • Preview Doesn't Find All Searched Text in PDFs

    I downloaded a PDF copy of my home insurance policy and I had it opened in Preview. The pages are displayed in the side bar. When I type in a search query such as "building" or "personal" or "dwelling" it doesn't find all occurrences if any yet I know there should be plenty of hits.
    I guess I can try Adobe Acrobat.
    Thanks for any advice.
    Kelvin

    I get 4 results when I search for ''<identifier>'' on that web page.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Reader doesn't find all pages in multipage articles

    Hey folks,
    just noticed that the "Reader" feature inside Safari doesn't always find all pages. Example:
    http://www.feedmag.com/templates/default.php3?a_id=1698
    Article has 3 pages, reader only finds 2.
    Anybody working on a fix on this?
    Cheers

    HI,
    Empty the Safari cache. From the Safari Menu Bar click Safari/Empty Cache.
    Relaunch Safari.
    If that didn't help, go to ~/Library/Caches/com.apple.Safari and move the "cache.db" file to the Trash.
    Carolyn

  • Finder doesn't find all files

    Finder doesn't list all folders in a folder.
    The "ls" Terminal command does.
    For example, when looking for a group called "Gladys Knight & the Pips" in my itunes library it is not shown in the folder listing using Finder.
    Here is a snippet from Finder:
    However, when using terminal commands, it is found.
    Bobs-iMac:iTunes bobs$ pwd
    /Users/bobs/Music/iTunes
    Bobs-iMac:iTunes bobs$ ls -aR | grep "Gladys"
    Gladys Knight _ Gladys Knight & the Pips
    ./iTunes Media/Music/Gladys Knight _ Gladys Knight & the Pips:
    ./iTunes Media/Music/Gladys Knight _ Gladys Knight & the Pips/Greatest Hits [Curb_Capitol]:
    I'm running a clean install of OS X Yosemite, version 10.10.2

    Last login: Tue Apr 21 21:23:51 on ttys000
    Bobs-iMac:~ bobs$ cd music
    Bobs-iMac:music bobs$ ls
    iTunes
    Bobs-iMac:music bobs$ cd iTunes
    Bobs-iMac:iTunes bobs$ ls
    Album Artwork            iTunes Media
    iTunes Library Extras.itdb    iTunes Music Library.xml
    iTunes Library Genius.itdb    sentinel
    iTunes Library.itl
    Bobs-iMac:iTunes bobs$ mdfind Gladys
    /Volumes/Western Digital/Music/iTunes (under music)/iTunes Music Library.xml
    /Volumes/Western Digital/Music/Various Artists/Motown Legends, Vol. 3/06 I Heard It Through the Grapevine.mp3
    /Volumes/Western Digital/Music/Various Artists/Billboard Top Rock & Roll Hits_ 1973/03 Midnight Train to Georgia.mp3
    /Volumes/Western Digital/Music/Unknown/Shop Around/03 Nitty Gritty.mp3
    /Volumes/Western Digital/Music/Unknown/READER'S DIGEST 20 YEARS OF SOLID GOLD GROUPS Disc 3/07 MIDNIGHT TRAIN TO GEORGIA.mp3
    /Volumes/Western Digital/Music/Ray Charles/Genius Loves Company/10 Heaven Help Us All.mp3
    /Users/bobs/Music/iTunes/iTunes Media/Music/Gladys Knight _ Gladys Knight & the Pips/Greatest Hits [Curb_Capitol]/06 Best Thing That Ever Happened to Me.mp3
    /Users/bobs/Music/iTunes/iTunes Media/Music/Gladys Knight _ Gladys Knight & the Pips/Greatest Hits [Curb_Capitol]/07 I've Got to Use My Imagination.mp3
    /Users/bobs/Music/iTunes/iTunes Media/Music/Gladys Knight _ Gladys Knight & the Pips/Greatest Hits [Curb_Capitol]/08 On and On.mp3
    /Users/bobs/Music/iTunes/iTunes Media/Music/Gladys Knight _ Gladys Knight & the Pips/Greatest Hits [Curb_Capitol]/09 Letter Full of Tears.mp3
    /Users/bobs/Music/iTunes/iTunes Media/Music/Gladys Knight _ Gladys Knight & the Pips/Greatest Hits [Curb_Capitol]/10 Every Beat of My Heart.mp3
    /Users/bobs/Music/iTunes/iTunes Media/Music/Gladys Knight _ Gladys Knight & the Pips/Greatest Hits [Curb_Capitol]/05 Midnight Train to Georgia.mp3
    /Users/bobs/Music/iTunes/iTunes Media/Music/Gladys Knight _ Gladys Knight & the Pips/Greatest Hits [Curb_Capitol]/03 Neither One of Us (Wants to Be the First to Say Goodbye).mp3
    /Users/bobs/Music/iTunes/iTunes Media/Music/Gladys Knight _ Gladys Knight & the Pips/Greatest Hits [Curb_Capitol]/04 Friendship Train.mp3
    /Users/bobs/Music/iTunes/iTunes Media/Music/Gladys Knight _ Gladys Knight & the Pips/Greatest Hits [Curb_Capitol]/02 If I Were Your Woman.mp3
    /Users/bobs/Music/iTunes/iTunes Media/Music/Gladys Knight _ Gladys Knight & the Pips/Greatest Hits [Curb_Capitol]/01 I Heard It Through the Grapevine.mp3
    /Users/bobs/Music/iTunes/iTunes Media/Music/Gladys Knight _ Gladys Knight & the Pips
    /Users/bobs/Music/iTunes/iTunes Media/Music/Various Artists/Motown Legends, Vol. 3/06 I Heard It Through the Grapevine.mp3
    /Users/bobs/Music/iTunes/iTunes Media/Music/Various Artists/Billboard Top Rock & Roll Hits_ 1973/03 Midnight Train to Georgia.mp3
    /Users/bobs/Music/iTunes/iTunes Media/Music/Unknown/READER'S DIGEST 20 YEARS OF SOLID GOLD GROUPS Disc 3/16 BEST THING THAT EVER HAPPENED TO ME.mp3
    /Users/bobs/Music/iTunes/iTunes Media/Music/Unknown/READER'S DIGEST 20 YEARS OF SOLID GOLD GROUPS Disc 3/07 MIDNIGHT TRAIN TO GEORGIA.mp3
    /Users/bobs/Music/iTunes/iTunes Media/Music/Various/Shop Around/03 Nitty Gritty.mp3
    /Users/bobs/Music/iTunes/iTunes Media/Music/Ray Charles/Genius Loves Company/10 Heaven Help Us All.mp3
    /Users/bobs/Documents/Music/Various Artists/Motown Legends, Vol. 3/06 I Heard It Through the Grapevine.mp3
    /Users/bobs/Documents/Music/Various Artists/Billboard Top Rock & Roll Hits- 1973/03 Midnight Train to Georgia.mp3
    Bobs-iMac:iTunes bobs$

  • Searching for a term using the Search tab in HTML Help doesn't find all relevant topics.

    I'm using the Search tab in the HTML Help window to search for a few words.  But those words are not being located within the topics.  For example, one of the words for which I am searching is Australian.  I can find the topic that contains that word using the Contents tab.  But the Search tab doesn't find it.  I have even tried copying the word from that topic into the Search box but it is not found.
    Is there a known bug in HTML Help search capabilities?

    Is this a stand alone CHM file or is it merged? If it is merged, does the word appear in the search in the CHM containing the topic is searched? I assume you've checked that your Stop List doesn't contain the word being searched?

  • AirPlay doesn't find all computers in the same network

    iMac is connected to Bose speakers and sound works just fine.  I can play music from Pandora, iTunes or any other source.
    I can also switch the sound from same iMac to AppleTV or to a MacBook Pro, as iMac finds them all from the AirPlay dropdown list.
    However, MacBook Pro doesn't "see" that same iMac.  BTW, both are running Mountain Lion and latest iTunes version.
    What am I doing wrong?  Any ideas?

    As Barney-15E has suggested, this looks very much like 2 routers, and some systems talking to router A and some systems talking to router B.
    Bonjour protocols will NOT cross a router boundary, so systems on router A will only see other systems on router A, and systems on router B will only see systems on router B.
    The recommented network setup is to make the router connected to the broadband connection be the ONLY router in the home and configure all other routers so they are in "Bridge" mode. That is to say, the other routers are configured so they just extend the primary router's subnet.
    How a home router is put into bridge mode is different depending on the make and model of router.
    In your case, I think the Belkin should be the primary router, and you should put the Time Capsule into "Bridge" mode. Applications -> Utilities -> Airport Utility -> Time Capsule -> Internet -> Connection Sharing: Off (Bridge Mode).
    Once you put the Time Capsule in bridge mode, all your systems should be on the same Belkin subnet, and now Bonjour will see all the Macs in your home.

  • ITunes doesn't find all my songs in Windows7

    After I install iTunes in Windows 7 I have over 5000 songs in C:\laptop\music and iTunes only shows 260 songs. How can I get it to find the remainder of my songs?

    Good afternnon from rainy Livingston in Scotland people.
    I seem to have a similar problem to L Anderson from Belgium.
    Two months ago I had to re-format the hard drive on my laptop as there seemed to be a lot of problems. I re-loaded all the software for my laptop, and then downloaded iTunes version 10. I now find that my iPhone (3GS) cannot synch all my music and audiobooks from my phone to iTunes. All iTunes seems to synch is the items that were bought from the iTunes store and the iTunes apps. All the other music that I copied from CD's does not synch: also, I spent a sum of money upgrading my songs from the iTunes store and again, iTunes does not synch them to my iPhone. Also, when I click on Devices in iTunes, my iPhone is recognized, but I cannot see my music or audiobooks.
    Please help!!!!

  • Spotlight doesn't find all files.

    Hi guys,
    i just installed Snow leopard on my old iMac that was running tiger before. With tiger i never had troubles like this and the same files im looking for now were always found. However spotlight doesn't seem to find them now. They are located in HD/library/.... anything in there cant be found and i didnt enable privacy for it.
    After i moved one application out of there and dragged it on the desktop it was instantly found. Doesn't seem like a big deal since i know where the app is and i have it in the dock anyways, the problem just is that i am looking for other files that im not sure anymore if they are on the computer and if spotlight just doesnt find them it would take me a lot of time searching for them manually.
    My question is, besides if you have a solution to fix this, if its due to snow leopard. Does it not look in the library anymore?
    Thanks in advance folks,
    P.S. i already re-indexed.

    Spotlight does not search system folders by default.  See,
    Get Spotlight to search system files (and more)
    Enter the search term in the Finder window's search field.
    Click the [+] button in the search bar to add a search option.
    In the first drop down menu choose Other.
    Choose “System Files” from the list that pops up (and check the box to place in drop down menu to avoid this step later,) click on the OK button.
    Now back in the Finder choose Include from the second drop down menu.

  • Hyper V Manager doesn't show all nodes

    I have 5 nodes in HyperV... Say HV01,02,03,04,05 which shows correctly in Fail over Cluster Manager. But it doesn't show up in HyperV Manager. 
    The HyperV Manager just shows 3 Nodes, say 01,02,03. What could be the possible issue?
    A reply will be highly appreciated....

    Hyper-V manager shows only servers you added manually to the console. You need to add missing nodes manually (right click on 'Hyper-V Manager' -> Connect to Server)
    http://OpsMgr.ru/

  • Find bar doesn't find all instances

    Title says it all, really. When I look for text it isn't always found. See the image which is from http://www.hsqldb.org/doc/guide/databaseobjects-chapt.html#dbc_common_elements

    I get 4 results when I search for ''<identifier>'' on that web page.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Snow Leopard finder doesn't list all files on Windows 7 volumes

    From my Macbook Pro (10.6.8), I can connect to my Mac Pro, while it is running Windows 7 in Boot Camp, in order to access the Mac Pro's 6 volumes (1 Boot Camp, 5 Mac volumes). This is using SMB via Finder's 'Connect to server…' on an Airport network.
    However, Finder never displays all the files and folders on any of the Mac volumes it connects to through Windows 7. It seems to show approximately the first 18-9 files and folders, and then nothing. The same applies when I open a nested folder — it doesn't list all of its contents.
    Any ideas as to what's causing this and how I can fix it? I have searched all over but can't find any answers yet, so I'm hoping someone here has seen this before.

    Thanks for the reply, but I do have the Restore Windows box checked (see below). And the Resume features info (cnet link) only addresses how to turn the feature off, either selectively or globally. I'm simply looking for the functionality that I had with Snow Leopard and now seems to be absent. Maybe it's a bug in my Finder.

  • Finder doesn't show all files

    When I add new photos to iPhoto, they do not appear as a file or item in Finder Documents list. I thought Finder was supposed to show all files and items that you create?

    santra, use EasyFind or Find File instead. BY default, Apple's own Finder/spotlight doesn't search everywhere and doesn't find everything (Mac fanboys will tell you this is a feature and is so intelligent that some people can't understand how smart it is; I prefer to think of it as a defect).
    Easyfind is here: http://www.versiontracker.com/dyn/moreinfo/macosx/8707
    Find File is here: http://www.versiontracker.com/dyn/moreinfo/macosx/10906315
    I hope this helps you to find all your stuff.

  • I have just made a clean instalation of Lion, with a bootable disk, and I planned to restore my files (music, photos, etc.), but Lion doesn't find my backup files. So, I'm about to loose all of my iTunes library, work docum The installation run perfectly,

    I have just made a clean instalation of Lion, with a bootable disk, and I planned to restore my files (music, photos, etc.), The installation run perfectly, but Lion doesn't find my backup files. So, I'm about to loose all of my iTunes library, work documents (I'm a lawyer!!), my kid's photos.... How can I restore my files?? Help!!

    Since you seem to be using a new disk for Lion, Time Machine will consider previous backups to be for a "different" computer.  Try doing a control-click or click-and-hold on the Time Machine icon in the Dock, then choose "Browse Other Time Machine Disks".  This should allow Time Machine to see the previous backups.
    In the worst case you should be able to open those Time Machine backups and copy your documents from there to your home folder.
    By the way, you've been misled by poor field labeling on this forum into typing a large part of your message into the field intended for the subject.  In the future just type a short summary of your post into that field and type the whole message into the field below that.

  • EM (management server) doesn't find node

    i created a new database.
    when i start EM(management server) and search for new nodes it doesn't find the db.
    when i start EM standalone i can easy add this DB to the tree.
    can i add the DB manually when connected to management server?
    i set the global db-name to the same as the sid. could this be the problem? i didnt specify the global db-name like this: sid.domain.yy.
    thanks a lot

    You need to Discover the nodes from navigator menu...or by pressing ctrl + D
    Make sure Oracle intelligence service is running on Nodes which you want to discover.
    like for Oracle 9i
    Oracle9iAgent

  • HT5467 I can't find a list of all of my apps in location services. It doesn't list all of the apps like fios tv remote that I want to use location services for.

    I can't find a list of all of my apps in location services. It doesn't list all of the apps like fios tv remote that I want to use location services for. I mean it doesn't list any of the apps that aren't the factory presets. How can I turn on location services for these apps?

    or settings/general/restrictions then under privacy tap on location services.  scroll down and it will list apps and whether this service is on/off for particular apps

Maybe you are looking for

  • Is there a way for the 5s to HOST CONTROL devices via Lightning or otherwise?

    So I asked this question in the regular Apple forum because I am trying to help a company why is not very Apple savvy figure out how to offer the same level of control they offer on Android devices with the iPhone 5, 5c and 5s. They realize there are

  • Losing extended rights in Reader 9

    I use Acrobat 9 pro to extend rights to Reader 8/9 users to add comments etc. in PDF documents, including forms. I have recently noticed a rise in the number of users who have lost the right to edit documents after saving a couple of times. Not all c

  • Photos App Uploads Photos But Doesn't Update

    Running the latest version of iOS, though I've had this problem for 3 or 4 months now. I'm using iCloud Photo Library (I'm aware it's still a "beta" feature, but this seems like a fairly prevalent issue and it's a relatively new issue). The Photos ap

  • Brute-Force Crash Recovery Options?

    Given the amount of crashes FCPX users are experiencing, I'm thinking of using an synchronization/archiving utility such as ChronoSync to monitor certain files/folders and archive them on a specific time interval (e.g. 10 seconds, 30 seconds, 5 minut

  • Handling Locking for transaction in Middle Tier versus Database backend

    Hi, If we implement middle tier with C# as the programming language and backend as SQL Server database, if we now wanted to implement locking where we take the classic case of money withdrawal from a bank account, we could implement this as a single