How to dynamically get the SOM expression of a field?

As a follow up to the note below, I would really appreciate any help as of how to get the SOM expression of a field dynamically, by this, I mean how to get the SOM expression of a field at running time using JavaScript.
Thanks,
Isis
That does make things clearer.  You will have to save the change  information in the XML.  I realize that you don't want to save an xml  node for every field, but there is a better way.  You can use scripting  to add data nodes to the XML data in the form.  I'm thinking of the  following:
Include an empty container node in your XML schema: <HighlightedFields></HighlightedFields>
When  a field is changed, in the field's change event call a common script:  HighlightChangedField, passing in the object.  The script will highlight  the field (set the border a certain color or whatever).  It will also  add node underneath the HighlightedFields data node with the SOM  expression of the field.  The SOM expression is the "path" of the object  in the form heirarchy, sort of like an xpath.  So if you have a subform  named Subform1 and you change the Name and Address textfields, you  might end up with something like:
<HighlightedFields>
    <HighlightedField>
        <SOMExpression>xfa[0].form[0].myform[0].Subform1[0].Name[0]</SOMExpre ssion>
     </HighlightedField>
    <HighlightedField>
        <SOMExpression>xfa[0].form[0].myform[0].Subform1[0].Address[0]</SOMEx pression>
     </HighlightedField>
</HighlighedFields>
The  upside of this is that you only store XML nodes for what is changed  instead of needing a specific XML node for each field.  The downside is  that you will need a call to the common script in every field's change  event: HighlightChangedField(this);
Now, to make this work  when a form is loaded the next time, in the initialize event at the  topmost subform in the hierarchy you add a script that walks the  HighlightedFields data node, and for each HighlighedField entry you  highlight the contained object.  You can get a reference to an object  using its SOM expression, so just take the SOM expression from each  entry and do an xfa.resolveNode(SOMExpression) to get the object, then set whatever attributes you want to highlight the field.
The  big issue I see with this would be if you have dynamically added  objects on your form.  In that case you would probably need to store the  instance index along with the SOM expression for each changed object,  then use that instance number when highlighting on form load.

As a follow-up, I had said I would try to put together an example for you.  The setting of the change indications and the highlighting of the fields is not a problem, but I did have an issue that perhaps one of the experts on the forum can help with:
The problem is how to detect a change in a text field without a lot of overhead.  You can't just place a call to the highlight method in the Exit event without checking for a change, since the user can just tab from field to field without changing anything. Unfortunately the properties that show the old text and new text of a field are not valid on the Exit event.  An alternative is to use the Change event, but with a text field the event fires for every character typed.  This seems like a lot of extra processing..
Anyone know a better way?  I went as far as using the extras collection on fields to hold the last value, but that adds a lot of complexity since it needs to be set to the initial raw value when the form is first loaded. I'd like to find a solution that doesn't require a lot of code to be added to every field on the form.

Similar Messages

  • How can I get the Airport Express to handle all the PPPoE stuff?

    Hi, I’m visiting my family in China, and now trying to help my dad, with his Airport Express and how to set up a PPPoE connection.
    We have currently set up the Airport Express in bridge mode (not distributing IP adresses and selecting DHCP under the Internet tab in admin utility). The Airport settings on our two computers is set up to connect using PPPoE using the given login name and password. (ps! we can not see the Base station in Airport Admin Utility when using these settings, we would have to select a new location from the Apple menu to see it and make condigurations.)
    What we want is to do, is to have the Airport Express connect to the ISP using a PPPoE connection and not through the computer.
    I know there is a 'Connect using PPPoE' option in Airport admin util, letting me input account name and password. If I select this setting instead of DHCP, enable distribution of IP addresses and configure my Airport card to NOT connect using PPPoE, I will see my base station in the Airport admin util with the IP address of 10.0.1.1 (or similar) and my computer will have x.x.x.2. Next to the Airport icon in the menubar, a scrolling message will say 'Looking for PPPoE host' without anything happen. I am sure my account name and password is correct as they've both worked when using this computer to connect to PPPoE (like now)
    How can I get the Airport Express to handle all the PPPoE stuff without using bridge mode?
    Ps! Both me and my dad have iPhones whom we can’t seem to get to connect unless its been distributed an IP address cause there's as fars as I know, no options of inputing a PPPoE user name and password.

    Any solutions to this? I'm in China also, in Beijing, trying to get my Airport Express to work with an ADSL modem.
    Direct ethernet cable connection to my Macbook works fine.
    When I configure the Airport Express with the ID and password that seems to be fine also – Airport Express shows a green light.
    But I cannot figure out the settings to connect wirelessly from my Macbook to the Airport Express. I get a constantly scolling message: "Looking for PPPoEhost..."
    thanks
    Paul

  • How do I get the statistics express to read more than 10 segments when reading from a .lvm

    I have tried 2 ways of doing this.  I had an for loop set up with a "Read labVIEW Measurement FIle" then a xy chart to plot the 2 measurements vs. each other.  The chart works and will plot everything great but the "Statistics" express will only take 10 samples at a time and will keep redoing the statistics for each subsequent segment of 10 samples.  I tried to change this to a while loop but then the same thing happens with the stats and the xy chart does not graph.  How do I get the stats calculate for the entire file?

    Richard,
    Thank you for contacting National Instruments.  I think I understand what you are looking to do here, but it might be easiest for myself and others to help you more specifically if you post a screenshot of your code, or your actual VI.  However, I looked into trying to achieve something similar, and used a loop structure to bring the information in from a file.  Then, outside the loop, I used the Statistics Express VI from the Mathematics palette to obtain some statistical values.  What type of statistics are you looking to receive from this program?
    Jason W.
    National Instruments
    Applications Engineer

  • How do I get the results of 2 text fields and put the output into another ?

    I have 2 text fields that multiply off of each other.
    My question is, is there a way to get the result of this and put it into another text field? And from that result get another result? Or do I have to get the results from a textarea?

    I have 2 text fields that multiply off of each other.I assume this really means you want to have something else multiply the contents of the two text fields. When you are using an object-oriented language, it is helpful if you consider what objects are responsible for what actions. Loose descriptions lead to confusion.
    My question is, is there a way to get the result of
    this and put it into another text field? And from
    that result get another result? Or do I have to get
    the results from a textarea?Assuming that your "text field" is a Swing text component (and not, say, an HTML text field) then it has a getText() method that returns the contents as a String. If you plan to multiply this by something then you'll want to convert it to an int or a double or maybe a BigInteger or a BigDecimal object. Are we on the right track here?

  • How can I get the table name of a field..

    Hi,
    If we know the table name we can find all the fileds from it
    using desc <tablename>.
    But, I would like to find table name of a known field's name.
    Where all these fields are storing in the database.
    THanks in Advance,
    Srinivasulu.

    ALL_TAB_COLUMNS
    rgds, APC

  • I just noticed that some of the movies I had in iTunes did not get transferred to the iPhone. The missing movies are shown as generic movie icons in the iTunes panel. How do I get the original movies to show up again and transfer to the iPhone?

    I just noticed that some of the movies I had in iTunes did not get transferred to the iPhone 5. The missing movies are shown as generic movie icons in the iTunes panel and are checked to select them. But they do not show up in iPhone Videos. How do I get the original movies to show up again and transfer to the iPhone? I recently upgraded Mac OS to 10.6.8

    1. iTunes won't offer cloud downloads for songs that it "thinks" are in your library, even if it "knows" the files are missing. If you've exhaustively searched for the missing files and there is no prospect of repair by restoring to them to their original locations, or connecting to new ones, then delete that tracks that display both the missing exclamation mark and are of media kind Purchased/Protected AAC audio file. Don't hide from iTunes in the cloud when asked, close iTunes, then reopen. You can download from the cloud links or iTunes Store > Quicklinks > Purchased > Music > Not on this computer > All songs > Download all.
    2. Why? Not sure, perhaps 3rd party tools or accidental key presses combined with previously hidden warning messages when trying to organize the library. There is a hint that using the feature to downsample media as it is synced to a device may also be involved, though I've not replicated it. Whatever the reason a backup would protect your media.
    tt2

  • I got some books from the itunes store and put them into my library.  I created a playlist so that I could burn them to cds.  The title is there but no contents.  It won't even play the playlist.  How do I get the contents of the book?

    I got some books from the itunes store and put them into my library.  I created a playlist so that I could burn them to cds.  It won't even play the book, there are no contents.  How do I get the contents of the book?

    I'm guessing this is a problem unique to me as there have been no replies at all...  Thanks a bunch folks

  • I downloaded some albums using my iphone, i then synced it with my PC. Now all the album artwork has gone from the songs i downloaded on my iphone, but not on the itunes on the pc. How can i get the artwork back on my iphone?

    I downloaded some albums using my iphone (3GS), I then synced it with my PC. Now all the album artwork has disappeared off my iphone but not off itunes on the PC. How can I get the album artwork back onto my iphone?

    I had the similar problem last night and found a solution (although it takes more than a few clicks).  Highlight all the album tracks in itunes on the pc and right click "get info". Check the artwork box in this window.  I found that the now playing art was showing up in the itunes window, but on songs that were missing artwork showed nothing in the get info box.  When I replaced the artwork by using the artwork command, or manually adding it into the "get info" window.  It was annoying but my iphone updated every album.

  • How can I get the default value of a particular preference programatically. I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.

    <blockquote>Locked by Moderator as a duplicate/re-post.
    Please continue the discussion in this thread: [tiki-view_forum_thread.php?comments_parentId=702631&forumId=1]
    Thanks - c</blockquote>
    == Issue
    ==
    I have a problem with my bookmarks, cookies, history or settings
    == Description
    ==
    How can I get the default value of a particular preference in FireFox?.
    I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.
    I see some that there are values for preferences in firefox.cs but I am not certain that these are being used as the default values for preferences. prefs.js in user's profile only has the updated values and not the default values.
    Any help towards acheiving this programtically is greatly appreciated.
    If the default values are stored in a file, kindly let me know the format in which it is stored for me to parse it programatically.
    == User Agent
    ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

    Dear Friend,
    Here when you have the callableSattement as ?=proc(?), the first ? is an output parameter. So you should register it as out parameter using registeroutparameter.
    Then you can get the value from the outparameter using callablestatement.getXXX().
    Try that way.
    For free tral versions of JDBC Drivers go to www.Atinav.com

  • How do I get the volume on my ipod classic to the same level for all songs?  Some are louder than others.

    How do I get the volume on my ipod classic to the same level for all songs?  Some songs are a lot lower than others.

    Coverflow in iTunes is sorted by Album Artist whereas coverflow on the iPod classic is sorted by Artist. Unfortunately, there is no way to set this on your iPod. This is such a fumble on Apple's part that I'm beginning to think they're becoming another Microsloth with buggy firmware and products.

  • How do i get the rest of my code on my itunes gift card if some got ripped off

    how do i get the rest of my code on my itunes gift card if some got ripped off?

    iTunes Store:  Invalid, Inactive, or Illegible codes http://support.apple.com/kb/TS1292

  • For some artists in my Music app on my I-phone, the songs do not appear when I search by the artist.  However, if I search the album name, all the songs show.  How do I get the songs to show under songs?

    For some artists in my Music app on my I-phone, the songs do not appear when I search by the artist.  However, if I search the album name, all the songs show.  How do I get the songs to show under songs?

    Hi Spam_Valley,
    I understand that you are having issues with your music displaying correctly. This may be an issues with the metadata stored within that song, and iTunes interpretation of that info.
    We may need to repair this. See the following resources for information:
    iTunes 10 for Windows: If song titles don’t appear correctly
    http://support.apple.com/kb/PH1468
    Fixing Incorrect Song or Album Listings in iTunes
    http://support.apple.com/kb/TA24677
    Thanks,
    Matt M.

  • How can I get the iTunes music on my phone on my computer as well? Some of it is there but not everything...

    How can I get the iTunes music on my phone on my computer as well? Some of it is there but not everything...

    I had the similar problem last night and found a solution (although it takes more than a few clicks).  Highlight all the album tracks in itunes on the pc and right click "get info". Check the artwork box in this window.  I found that the now playing art was showing up in the itunes window, but on songs that were missing artwork showed nothing in the get info box.  When I replaced the artwork by using the artwork command, or manually adding it into the "get info" window.  It was annoying but my iphone updated every album.

  • AVG tried to take over the Firefox Program. I unchecked some stuff on AVG and now Firefox doesn't lool right. There is only a bar at the top of the page with "Firefox" and "new Tab" . How do I get the Firebox homepage back?

    AVG tried to take over the Firefox Program. I unchecked some stuff on AVG and now Firefox doesn't look right. There is only a bar at the top of the page with "Firefox" and "new Tab" . How do I get the Firebox homepage back?

    Google Toolbar Options, in the Search tab, make sure that '''Enable the Google new tab page''' is check-marked. If that doesn't fix it for you, see this for support information about the Google Toolbar. <br />
    [http://www.google.com/support/toolbar/?hl=en] <br />
    Or visit the Google Toolbar forum. <br />
    [http://www.google.com/support/forum/p/Toolbar?hl=en]
    As far as your UserAgent showing Firefox 3.0.11, see this: <br />
    https://support.mozilla.com/en-US/kb/Websites+or+add-ons+incorrectly+report+incompatible+browser
    You might want to consider getting rid of that '''desktopsmiley''' program that has messed up your UserAgent, it is known as Malware.

  • Panasonic P2HD how do i get the video into Final Cut Express.

    I have a Panasonic P2HD video camrea how do i get the video into FCE.

    You can't. FCE doesn't support DVCPRO HD. You'd have to convert it to the Apple Intermedia Codec in some other sofware. FCE also probably doesn't support the frame resolution the P2 media is using.

Maybe you are looking for

  • How to link Sales Order with Service Contract and then with Install Base?

    Hi Friends, 1) I would like to know the integeration process from sales order to Service Contract and then with Install Base. 2) I couldn't see anything enabled in Service Tab in Order Lines, its grayed out. Is there any set up/profile option to get

  • Does anyone know which was the first version of Acrobat to offer electronic signatures?  Thank you.

    Trying to roll out a project that includes electronic signature (only... does not include digital certificate) in an organization with many older versions of software floating around. (It is a controlled environment, where not that easy to just have

  • Two Clients in a Machine

    Hi all, Can we have two clients in the same machine like one with SP 03 and other with SP 02. Please help me out, Thanks in advance, Regards, G.Vijaya Kumar

  • Error in Webservice call

    Hi All, We are trying to call a webservice synchronously which is in IIS webserver. But we are getting the following error <SAP:Error><SAP:Category>XIAdapterFramework</SAP:Category> <SAP:Code>MESSAGE.GENERAL</SAP:Code> <SAP:AdditionalText>com.sap.aii

  • Multi-threaded video decoding problem

    I have simple AIR 3.8 application with 2 VideoPlayers: <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" applicationComplete="init()" showStatusBar="f