Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

A table row repeats when footer is set to be on the final page

Avatar

Level 1

I have been fighting with my form for over an hour, and I am probably too tired and not seeing the solution because it is after midnight in my time zone.

 

I am recreating in Adobe LiveCycle Designer 8 what was originally designed in an Excel workbook nearly two decades ago. I did not import the workbook into LiveCycle, since I wanted to avoid all of the macros that are working behind the scenes. (I know how to write VBA, but it is not my workbook.)

 

I have been learning LiveCycle as I have been going, and I am getting better it with each passing hour and day. I managed to create buttons that add and remove rows in tables on two different pages. The current table that I am working on is for a competition judge to enter their scores. Everything is ready, but when I preview the form, the table displays two body rows, instead of the single one that I created. (The buttons that I mentioned earlier, add and remove rows with similar settings in their respective tables that are selected for the one that I am experiencing problems with.)

 

What I have discovered so far, is that when I set the footer row to 'Include Footer Row in Final Page', I get the duplicate row. When I clear that setting, I see only one row displayed. There is over 1.5" of space below the footer row on the master page, so space should not be an issue.

 

I have turned on and off different settings within the table in a vain attempt to get it to display properly. Like I said earlier, I am probably too tired to troubleshoot properly at this stage.

 

Any ideas, suggestions, or insights will be appreciated.

Thank you in advance.

6 Replies

Avatar

Level 10

There are serveral possible reasons for your issue, so it's not easy to answer. Can you share your form, so we can look at it? 

Avatar

Level 1

Hello radzmar,

I have looked through the editing options available, but I do not see anything that indicates that I can upload any content.

Is there a preferred location or app that you suggest that I use, so that you can obtain a copy of the form?

Sorry for the delayed response, but I was tackling something else the other day, and this is my first opportunity to reply.

Thank you.

Avatar

Level 10
Use a service of your choice (Google Drive, Adobe document cloud etc.…) to make the form accessible online and share a link here.

Avatar

Level 1

I selected the wrong button when I clicked on "Correct Reply". I thought that I was going to be able "to correct" something, and not mark it with an attribute. If you are able to alter that attribute, I will appreciate it.

 

Here is the link that you asked for earlier. I was very busy lately, so this is the earliest opportunity that I had to post the link.

 

Hopefully, having the file in-hand will provide you with the context that you need in order to review what I have done incorrectly, and how I can avoid this problem.

 

On a recent form that I re-jigged, I needed to include actual subforms instead of subforms as pages. Could it be that I did not set up things properly in this form versus my newest one?

Avatar

Level 10

Hi, I got your form, but I don't see the problem. Which one it the table your're talking about? 

What I see is that you heavily using the resolveNode() method, which makes you form really slow since your're always starting at the root node of you form using xfa.resolveNode("xfa.form …"). This is unneccessary because you can address nodes directly by using their SOM expression.

 

For example look at the click event under form1.sfSpeakers.tblSpeakers.rAddSpeaker.btnAddSpeaker.  Your current way is to resolve each target beginning from the root node which is slowest possible way to do this.

xfa.resolveNode("xfa.form.form1.sfSpeakers.tblSpeakers.rSpeaker").instanceManager.addInstance(1);
xfa.resolveNode("xfa.form.form1.sfTimekeeper.tblTimekeeper.rSpeakerTimesFaults").instanceManager.addInstance(1);
xfa.resolveNode("xfa.form.form1.sfJudge.tblJudge.rSpeakerEvaluation").instanceManager.addInstance(1);
xfa.resolveNode("xfa.form.form1.sfJudgeImpromptu.tblJudge.rSpeakerEvaluation").instanceManager.addInstance(1);

 

You can use much shorter code and avoid the resolveNode() method at all, when you use SOM expressions. Those can be relative to the current position of you object in the forms hierarchy. 

_rSpeaker.addInstance(true); 
sfTimekeeper.tblTimekeeper._rSpeakerTimesFaults.addInstance(true);
sfJudge.tblJudge._rSpeakerEvaluation.addInstance(true);
sfJudgeImpromptu.tblJudge._rSpeakerEvaluation.addInstance(true);

 

Another sample for the initialize event under form1.sfSpeakers.tblSpeakers.rSpeaker.nfSpeakerOrder. Don's use the resolveNode() method. Don't use the initialize event for this purpose. Why? Because the event only fires once so the vaues won't get updated until you reopen the form next time. This can lead into confusion if you delete instances.

this.rawValue = xfa.resolveNode("xfa.form.form1.sfSpeakers.tblSpeakers.rSpeaker").index + 1;

 

Use the SOM expression relative to an object. In this case use the repeated itself and its index change event which is form1.sfSpeakers.tblSpeakers.rSpeaker. Since the field nfSpeakerOrder is a nested object you can simply write this short code.

nfSpeakerOrder.rawValue = this.index + 1;

 

Btw: There'e a function in the script editor that helps to get the SOM expressions. Place the text cursor at the position of you code you want enter the SOM expression. Then move the mouse over the object you want the reference, hold down [Ctrl] so the mouse arrow becomes a "v" then click the left mouse button. The SOM expression of this object then is pasted into the position in script editior you've selected before.

 

 

Avatar

Level 1

Thank you for the feedback. Considering that this was my first form using this application, and I was learning as I was going, after reading J.P. Terry's book from 2006(?), it was the best that I could do given the time I had spent on it. I am familiar with object oriented programming, and I will make the adjustments in my next versions.

Where I was encountering problems was with the last table on the last pages. With only one speaker entry available, there should be only one row (or subform) for the subsequent areas. So, on the last page, there should be only one subform for the Prepared Speech and one subform for the Impromptu Speech. What I see, when I open the form, is that there is a duplicate subform. At the time, all of my attempts to remove them failed. The only success that I had was to turn off the footer row, but that defeats my requirement of the judge to acknowledge that the form is complete.

The total number of pages when the form is initialized should be two less than I obtain right now.

If we can solve that problem, then I will be happy.