Code on button needs to work throughout all instances

Hello,
I have a subform with an 'ADD' button and a 'HIDE' button.
The 'ADD' button adds an instance of the subform.
The 'HIDE' button unhides a white box which makes the ADD button go invisible. Both buttons travel with the new instance.
When I ADD an instance of the subform and then go to the new page and try to HIDE the new ADD button it does not work.
I assume it is because I am unhiding the whitebox by name and once it is repeated the name changes.
Question: How can I have code within an instanced subform that works regardless of it's name?

I would just use the "parent/child" addressing system.
In the click event of your hide button add:
this.parent.AddressOfTheAddButtonFromTheInstance.presence = "invisible";
May need to add more "parents" (e.g. this.parent.parent.parent) depending on if you have the hide button wrapped in a few subforms.
Hope thsi helps,
Tom
P.S.
What S. Bishiop is saying to use is the addressing of each instance as an individual item, e.g. :
for (var i=0; i < Question2.DeviceForm._Device.count; i++)
Question2.DeviceForm.Device.all.item(i).PositionedWrap.DeviceType.mandatory = mandatorySetting;
This loops through every instance of the repeating form "Device" and sets a field to being mandatorySetting (error or disabled, depending on what I want, in this case).

Similar Messages

  • Help, my home button won't work at all!!!

    Hi,
    my home button won't work at all, and when I tried to restart the phone, the message appears that this action won't work unless the phone is on the airplane mode. Can't really read the whole message cause it disappears after a second or so.
    I put the phone on the charger and the USB connection also failed.
    What happened?

    It sounds like it's broken. Assuming you haven't jailbreaked or otherwise hacked it you should try a Restore or a Recovery. If you put it in the cradle and you can't restore it see: http://docs.info.apple.com/article.html?artnum=305797 for Recovery mode.
    If this doesn't work call Apple or take it to an Apple store; it probably needs to be replaced.
    If it HAS been hacked go to the source of your hacking tools for help; we aren't allowed to discuss it here.

  • File missing (file\BCD error code 0Xc0000034 help need for work!

    file missing (file\BCD  error code 0Xc0000034 help need for work!    what can i do?
    have an p 2000 notebook pc

     Hi bobkunkle, welcome to the HP Forums. I understand you cannot boot passed the error you are receiving.
    What is the model or product number of your notebook? What version of Windows is installed?
    Guide to finding your product number
    Which Windows operating system am I running?
    TwoPointOh
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • HT1430 My sleep button doesn't work at all I can't turn phone off or lock it

    My phone sleep button does not work at all I can't turn phone on or off or unlock it

    Make a Genius Bar reservation for your nearest Apple store to have the Tech person create a repair order for you.  Be sure your phone is backed up to iCloud or iTunes prior to going in. 

  • I have just updated my iPhone to version 5.1, and the camera button next to the "slide to unlock" button does not work at all. It used to function well before the update. Can someone help??

    I have just updated my iPhone to version 5.1. After the update, the camera button next to the "slide to unlock" button does not work at all. It used to function well before the update. It happens to my friends as well. What should I do? Can someone help?? Thanks!!!!

    Slide the camera button up

  • My Themes, Music and Settings buttons don't work at all (iPhoto '11)

    In my iPhoto '11, my Themes, Music and Settings buttons (shown below on the right side) don't work at all.  When clicking them, nothing happens (no response, no windows open, etc).  The only button that works is the Text Slide button.  I've already rebuilt my library and that didn't work.  Please help!!!    

    Delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your Home/Library/Preferences folder, launch iPhoto and try again.
    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding the the Option key.  You'll also have to reset the iPhoto's various preferences.

  • :*(  Form buttons don't work for all testers

    I created a form in Acrobat 9.1 using Forms> Add or Edit Fields. The form contains action buttons for next page and previous page, to clear all fields, and (with the generous help of a fellow forum member) to print the form and save it to disk. I optimized the form with compatibility set to Acrobat 8.0 and later, then enabled it for Reader. I sent this form to several users for testing.
    Those using Acrobat have no problems with it.
    Those using Foxit Reader have no problems with the action buttons or the form fields (except that date fields are finicky; Foxit doesn't convert the dates to the correct format the way Reader or Acrobat do). But, the yellow background that I created as a watermark -- so I could make it visible but not print -- is printing. That's not anything that Acrobat can help, but it is a very good reason to not recommend using Foxit. It would create a dreadful shortage of yellow inkjet ink.
    Those using Reader 8.0 to 8.1.2 are having several problems. For them, the action buttons don't work... except the "clear all fields" one. The buttons don't do anything; there are no errors, no messages, no activity of any kind except to change color when clicked.
    The buttons that don't work are all set up as Mouse Up actions executing a menu item... for example, "Go to page 2" is just View>Go To>Next Page. The "Clear all fields" button is, on Mouse Up, "Reset a form" with all fields selected... so it's the only kind of button that works for Reader users, and it's the only button that doesn't execute a menu item.
    Why is there a difference in actions these users can run? If it's a security issue... what possible risk is there in going to the next page, using a button instead of a scroll bar or Page Down key??? I can find no common sense here, especially because Reader users are the only ones barred from these form actions. Everyone else can use them.
    -- Also, these testers (Reader 8+) are having problems with the tab order. Some of the radio button groups (which have no more than three options, Yes, No and NA) at first appear to be tabbing correctly, because the Yes option receives focus in the correct order... but randomly, tabbing through several fields, suddenly the No option will get focus... in a radio button group nowhere near the current tab location. Tabbing is rendered useless, then, because these anomalies are unpredictable and it doesn't appear there's anything I can do to prevent this from happening.
    It's pointless to delete and re-add the afflicted radio buttons. That has no effect... and the radio button groups are already in the correct order anyway. I don't know how this could possibly happen... But it doesn't happen for the Foxit or Acrobat testers.
    • Why would Reader be the only app that can't use the buttons and can't tab through the fields correctly? I'd think Adobe's own software would work best with their own file format. •
    Is Reader 8 the problem --- should those users all update to the newest version? I don't have any Reader 9+ testers yet. Nobody seems interested in it. The testers all assume the problems are MY fault, so nobody's happy with me and no one wants to bother testing the forms because there's always something wrong.
    <hair-pulling> I seriously regret upgrading to Acrobat 9.1.  I know other forum members who agree this thing is catastrophically buggy -- I've wasted  weeks trying to iron out all the problems I've been having with these forms, forms that should have been quick and simple to create, and in past versions of Acrobat, would have been. Yet I'm still tearing out my hair over tab order! Worse, I fear I'm close to losing my job for all the time wasted and all the projects I've fallen behind in because of this. <no /hair-pulling in sight>

    I have no clue, but it might make a difference depending on the form being produced in Acrobat versus Designer. Acrobat will take you both places and one of them may have an issue with backward compatibility. I have not heard of that, but it is a possibility.

  • X230 Trackpoint buttons do not work at all

    Hi,
    i am running Debian Wheezy. The trackpoint buttons of my x230 do not work at all.
    I also tried an actuall Kanotix live distribution. The buttons do not work with Kanotix also.
    Has anybody experienced similar issues, or have an idea, whats wrong?
    The trackpoint itself works fine. Unfortunately i have no windows available to test it with that OS.
    Is it likely a hardware issue? Would it make sense to remove the keyboard to have a closer look at the buttons?
    Thank you very much.

    Hi, Funkwecker
    Hope you are doing well I was wondering if you could give me more information about what you have tried and what version of Debian Wheezy and Kanotix you tried using. Also some general info. about the specs on your computer too would be great! Thanks!
    Did you find a post Awesome? A response just Outstanding? Kudo them!
    Did the post you read answer your question? Did someone help you figure out your problem? Hit Solution Provided and give that person a pat on the back for helping you out!

  • IPhone 4 Does not charge or get recognized by laptop and the home button does not work at all.

    The home button on my iPhone 4 does not work at all. Also, when i plug it in to charge, it does not charge at all, and it doesn't even say that it is connected. What will Apple do about this if i send it off? Will I get a replacement? All answers much appreciated.

    Buenas Matias,
    Si, pude solucionarlo hace unos dias, al final me arriesgue y compre el "dock connector", un juego de destornilladores para iPhone 4, lo desarme y lo cambie, y al toque empezo a cargar.
    No queria esperar semanas para el repuesto de iFixit asi que lo compre en MercadoLibre, estan 160 mangos, y si no te queres arriesgar a desarmarlo y cambiarlo vos, hay algunos que te hacen la instalacion tambien.
    Pero primero averigua bien que tengas el mismo problema que yo, o sea el dock connector sirve para lo q describi arriba. Si tenes otro sintoma te recomiendo que investigues porque capaz es otra cosa y terminas gastando un repuesto al pedo.
    Espero que te sirva.
    Saludos
    Gonzalo.

  • Enter button doesn't work at all help!

    The enter key on my Macbook Air does not work at all anymore. I did not do anything differently and nothing happened to it - no spill, did not drop the laptop - nada. I have reset everything to defaults, open the key and clean under it. I am really hoping that it is not a hardware problem - but to ensure that it isnt I need to wear out ALL possible software problem. ANY SUGGESTIONS? please and thank you.

    Welcome to the Apple Discussions. Since the Font Book application crashes try deleting its preference file, com.apple.FontBook.plist from your User/Library/Preferences folder. Then try again.
    OT

  • Help my menu button does not work at all

    it won't work the menu button doesn't work
    Windows P.C   Windows XP  

    Welcome to Apple Discussions!
    Try these...
    Resetting iPod
    Restore the iPod
    If those do not help, then it is a hardware problem. Your iPod may need service...
    iPod Service
    btabz

  • My home button doesn't work at all, what should I do to close my apps?

    The home button on my iPod doesn't work at all, even wen I press on it really hard. Any suggestions on what I should do?

    Try:
    http://snapguide.com/guides/calibrate-your-home-button/?utm_expid=69945963-15
    fix for Home button
    iPhone Home Button Not Working or Unresponsive? Try This Fix
    - If you have iOS 5 and later you can turn on Assistive Touch it add the Home and other buttons to the iPods screen. Settings>General>Accessibility>Assistive Touch
    - If not under warranty Apple will exchange your iPod for a refurbished one for:
    Apple - Support - iPod - Repair pricing
    You can do it an an Apple store by:
    Apple Retail Store - Genius Bar
    or sent it in to Apple. See:
    Apple - Support - iPod - Service FAQ
    - There are third-party places like the following that will repair the Home button. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens

  • My sleep/wake button will not work at all. What to do?

    I have and Ipad 2 and I never had a problem with anything until today when early the wake/sleep button will not do any it won't work at all. Please help!!!
    -Thanks

    and also my phone is disabled on top of that with a red screen!

  • All of a sudden my back button does not work at all, on any site, and when I start Firefox it does not go to the home page I specified

    Just a few days ago, I noticed that when I start Firefox it goes to a blank page, despite the fact that I have several times checked and rechecked under "Options" and my home page is in there. Also the back button has stopped working. I have made sure that inprivate browsing is not enabled, history is maintained etc etc

    Does the issue still occur if you start Firefox in Safe Mode? http://support.mozilla.com/en-US/kb/Safe+Mode
    How about with a new, empty profile? http://support.mozilla.com/en-US/kb/Basic%20Troubleshooting#w_8-make-a-new-profile

  • The 'go back one page' button does not work on all pages

    The 'go back one page' and 'go froward one page' buttons do not work (they're light gray as opposed to dark gray) and neither does the 'back' button after right clicking. They worked fine in Firefox 3 but do not in version 4

    Click '''Help '''| '''Restart with add-ons disabled '''and then in the menu which appears, checkmark ''Reset toolbars and Controls'', then ''Make changes and restart''.

Maybe you are looking for

  • Dual Monitor problem and an idea

    Hey everyone. I use two monitors and when i have iTunes open on the primary one(the laptob monitor) i am able to scroll through my music in iTunes using my mouse wheel. However, when iTunes is opened on the other monitor, scrolling through songs with

  • Cant get my printer to work with Windows Vista

    I have a Deskjet 932C printer. I bought my computer 2 years ago and my printer worked just fine with Windows Vista. We just moved so I had to take everything apart and put it back together. Now I cant get my software to install that came with my prin

  • Issue with Cumulative Value in BW Query

    Hi Here am trying to calculate a percentage over the two key figures which has the cumulative check in Calculation but in result the percentage is appearing with non-cumulative values though am selecting the cumulative kf in formula. find below the e

  • Sending response back

    Hi I’m getting message from source system (MQ) for   which I need to validate the header details and mandatory field information in XI, if success then send to SAP system through proxy otherwise send the response back to MQ system with batch number o

  • SAP - Novell IDM Connector

    We are implementing a Novell IDM LDAP connector to interface with SAP HR systems. We are passing PA fields across via IDOC's. A routine (Novell side) creates a new User ID & E-Mail Address to be passed back to populate IT0105. We get the error messag