Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

addInstance help

Avatar

Level 4

I am stumped as to why my "add" button will not work to add another row to the table. I am certain the script is correct. Can I send the form to someone to take a look at and possibly tell me where I am going wrong?

Thanks so much,

Jenny

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Yes ....

Found your issue ....when you define a subform as flowed you have to indicate that there may be more than one of these subforms. If you click on the repeating subform (in your case the Row1 node in the hierarchy view), then on the Object/Binding tab at the bottom of that tab there is a checkbox that indicates "Repeat Row for Each Data Item". Make sure that is checked.
If you activate the Java console (Ctrl-J) in Acrobat you will see this error:
GeneralError: Operation failed.
XFAObject.addInstance:1:XFA:form1[0]:RunningList[0]:Students[0]:Row1[0]:Subform[0]:Add[0]:click
The element [max] has violated its allowable number of occurrences.
That is how I found the issue.
Paul

View solution in original post

5 Replies

Avatar

Former Community Member

Before you do that make sure that you saved the form as a dynamic PDF. If that still does not work send it to LiveCycle8@gmail.com

Paul

Avatar

Level 4

It is saved as a dynamic pdf. I just noticed also that the image will not appear on the pdf viewer and when I open in Acrobat. I will send the form to the email you indicated. Thanks. It is coming from jrowe@lepsolutions.com

Avatar

Correct answer by
Former Community Member

Yes ....

Found your issue ....when you define a subform as flowed you have to indicate that there may be more than one of these subforms. If you click on the repeating subform (in your case the Row1 node in the hierarchy view), then on the Object/Binding tab at the bottom of that tab there is a checkbox that indicates "Repeat Row for Each Data Item". Make sure that is checked.
If you activate the Java console (Ctrl-J) in Acrobat you will see this error:
GeneralError: Operation failed.
XFAObject.addInstance:1:XFA:form1[0]:RunningList[0]:Students[0]:Row1[0]:Subform[0]:Add[0]:click
The element [max] has violated its allowable number of occurrences.
That is how I found the issue.
Paul

Avatar

Level 4

Thank you, Paul. That did solve the issue.

Best regards,

Jennifer Rowe

jrowe@lepsolutions.com

832-403-0610

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----