I have two tables in a form that i would like to mirror onto another (to reduce double typing). I was hoping to get information from form1.page1.Table1.Row1.Cell2 to populate to form1.page1.Table1.Row1.Cell2. That's not the only thing i'm trying to achieve... The tables have buttons that allow for addition of new rows. So, this script would need to be able to grow for more information. Is anyone aware of such a script?
* Have two cells mirror one another
* Apply the mirroring effect on any future row additions
That will duplicate the text in the second table when the first is exited.
If you want to do this with repeating rows, there is something you should consider. I am not sure how much experience you have with referencing different instances, but the instance is referenced by using ,  etc. You should probably rename your second table so the code does not get confused.
For instance, the first repeated row instance is:
The second is:
And so on. You can use the instance manager to find out what row you are up to Table1.Row1.instanceManager.Count
You can then use this count to send the rawValue of the table cell to the other table in the right instance and cell.
I am assuming that if you make a new row in table1, it would in table2 at the same time?
Study the example from Assure Dynamics. They handle the delete function differently than the add function. They basically send a "click" event to the button in each table, just as if someone had clicked the button.
Here's an example from the delete button on one of my forms:
// '_' is shorthand for instanceManager, eg '_Row1'
// this.parent.index tells instanceManager to remove
Thank you both so much! This definitely pointed me in the right direction. I now have both tables mirroring information and when I add a row to the top table, the bottom one replicates it perfectly. I have only one thing that I cant figure out on this. I want to add a delete button to the top table and have it subtract a row from both tables. Looking at the table one add button the code that works is:
I'm under the impression that if I add the same code to the delete button and change it from a addInstance to a removeInstance it should delete the cell. This isn't the case... Any idea on what to do?
The problem is that the way i have done it, it will only send the duplicated text to the other table if the instance count matches the row number. The code does show you how to identify an instance, but will only work as you want, if you add one row at a time and do the text duplication straight away.
I havent got time to try another way, but you would need to use logic to send the data to the other table based on the row you are on.
default: //this is required, if no other conditions are met, do whatever code you put here. It is optional, you dont need to put anything
As explained at the top, when i created more rows but didnt put data in the previous rows, the code does not duplicate. In this case below, i added three rows and as the instance count is 3, only the third instance (row) is duplicated. Even though it didnt work as we desired, this should give you an insight into referencing other instances.