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

Add instance problem with calculation

Avatar

Former Community Member

I have a form where I have a total calculation field. When I add an instance

in the form everything below that instance is no longer calculated. Ple

ase help.

K

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

You need a .rawValue ,,,like this:

xfa.resolveNode("#subform[1].setup-tr2").rawValue

+xfa.resolveNode("#subform[1].mid-tr2").rawValue+ etc....

View solution in original post

6 Replies

Avatar

Former Community Member

what expression did you use on the calculation? Which version of Reader did you target for the form?

Paul

Avatar

Former Community Member

xfa.resolveNode("#subform[1].setup-tr2")

+xfa.resolveNode("#subform[1].mid-tr2")+ it goes on from here.

Its targeted for reader 9.0 or later.

Avatar

Former Community Member

You will need a rawValue on the end of each of those expressions ....I am assuming setup-tr2 is the fieldname.

If that does not work send the form and a description of the issue to LiveCycle8@gmail.com and I will have a look.

Paul

Avatar

Former Community Member

Yes setup-tr2 is a field name. S

o my expression should look like

xfa.resolveNode("#subform[1].setup-tr2")rawValue

+xfa.resolveNode("#subform[1].mid-tr2")rawValue+ ?

Avatar

Correct answer by
Former Community Member

You need a .rawValue ,,,like this:

xfa.resolveNode("#subform[1].setup-tr2").rawValue

+xfa.resolveNode("#subform[1].mid-tr2").rawValue+ etc....

Avatar

Former Community Member

Opps, I forgot the .

I did try this and it worked to keep all calculation in my total, but now when I add instance, I get an error message. I did email you a sample of my form with an explaination of my issue, before I added the .rawValue.

Thank you. K

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] ----