I'm aware of how to Add or Delete a Row to a table where the buttons are located within the table (see Sample 1) but can you have the button located at the buttom of a page instead, outside the table (see Sample 2). If yes, can you please assist me with the scripting
The reason for this is that I want the row being inserted not to include the Add / Delete buttons again.
Any assistance would be greatly appreciated.
Regards
Jen
Solved! Go to Solution.
Views
Replies
Total Likes
I was merely showing you how to add with the FormCalc reference. You can now add th erest if statement and the rst of your code to the expression.
Paul
Views
Replies
Total Likes
The Add row can certainly live outside of the actual row (when you do an addInstance you are merely adding to the bottom of the stack of subforms). The deleteInstance requires an occurance number so that we know which row to delete. When we add the delete button to th erow we can get the instance number by knowing which button they pressed. This can now be used to remove the right instance. You can have the delete button outside but you will have to indicate which one to delete (it could be the last one, the user could indicate which one).
Make sense?
Paul
Views
Replies
Total Likes
Thanks. I have got it to work but unfortunately when the row is added the formula isn't updating and therefore is incorrect.
Is there some way of getting the formula to automatic update for the inserted line?
Jen
Views
Replies
Total Likes
This is a case where FormCalc is much easier than Javascript. Have a look at what I have done in this modifies sample.
Paul
Views
Replies
Total Likes
The formula that you have used isn't achieving the same end result that I was getting with my 'If' statement.
Your formula
Cell3 + Cell4 + Cell5 + Cell6 + Cell7 + Cell8
My formula
if (Table1.HeaderRow2.Cell3.rawValue == null) {
this.rawValue = Table1.Row1.Cell3.rawValue + Table1.Row1.Cell4.rawValue + Table1.Row1.Cell5.rawValue + Table1.Row1.Cell6.rawValue + Table1.Row1.Cell7.rawValue + Table1.Row1.Cell8.rawValue;
}
else{
this.rawValue = Table1.Row1.Cell3.rawValue*Table1.HeaderRow2.Cell3.rawValue + Table1.Row1.Cell4.rawValue*Table1.HeaderRow2.Cell4.rawValue + Table1.Row1.Cell5.rawValue*Table1.HeaderRow2.Cell5.rawValue + Table1.Row1.Cell6.rawValue*Table1.HeaderRow2.Cell6.rawValue + Table1.Row1.Cell7.rawValue*Table1.HeaderRow2.Cell7.rawValue + Table1.Row1.Cell8.rawValue*Table1.HeaderRow2.Cell8.rawValue;
}
Views
Replies
Total Likes
I was merely showing you how to add with the FormCalc reference. You can now add th erest if statement and the rst of your code to the expression.
Paul
Views
Replies
Total Likes
I have managed to get this to work, thanks, but now have a slightly different query.
I am wanting to have a click button where the user is able to duplicate a table rather than just a row.
Is this possible and if yes how. If need be I can e-mail the document to you.
Cheers
Jenny
Views
Replies
Total Likes
It is the same technique as adding the row .....the code to add the row navigates down to the row subform level. To add the complete table modify the statement to stop at the Table level instaed of the row level.
Make sense?
Paul
Views
Replies
Total Likes
This is the coding that I used for duplicating the table but it isn't working. I have
Subform1.Table2.addInstance(1);
Since we can't upload attachment this is basically the page layout:
Page2
Subform1
Table2
Row1
Row2
Row3
Row4
Row5
Subform2
Button1 (this is my add table button)
Your assistance would be greatly appreciated
Jenny
Views
Replies
Total Likes
Can you post your form to LiveCycle8@gmail.com and I will have a look.
paul
Views
Replies
Total Likes
Going forward with my 'Adding Rows' button, is it possible to have the table headings repeated at the beginning of a new page should it roll over when new rows are added (by the clicking the 'Add Row' button).
e.g. The top two greyed rows need to be repeated (at the top of the page) only when the information underneath rolls over to a new page. Hope this makes sense!!!
I have e-mail the attached to you.
Regards
Jenny
Views
Replies
Total Likes
Hi Paul,
Views
Replies
Total Likes
I did not receive an email from you .....did you send it to:
LiveCycle8@gmail.com
Paul
Views
Replies
Total Likes
Hi Paul,
Sorry to do this but can you help again?
I have made you the changes that you suggested but when it all gets put together, it doesn't formatt correctly.
As you will see the Header (two greyed rows) doesn't carry over on every page for some reason.
Are we able to arrange for when the new Add Row is inserted that it actually starts on a new page?
The attachment I actually created an additional two Rows but it hasn't saved the text into the rows making me believe that the Add Row button isn't working correctly.
Regards
Jen
Date: Thu, 15 Apr 2010 06:09:26 -0600
From: forums@adobe.com
To: bluey72@live.com
Subject: Adding / Deleteing Rows
I did not receive an email from you .....did you send it to:
mailto:LiveCycle8@gmail.com
Paul
>
Views
Replies
Total Likes