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.
SOLVED

Naming calculated numeric fields, series calculations?

Avatar

Former Community Member

I don't know why it's not working, but I'm having a lot of trouble getting what should be simple calculations to work on Adobe LiveCycle Designer (using v 8.2.1 on Windows XP).  Maybe I'm not entering the correct command in JavaScript.  Here's what I'm doing:

I create a numeric field on the form, then go into the Binding tab and name it "FieldA."

Now I create a table, and set the first cell as a numeric.  I go into the Java Window, Show Calculate, and type:

FieldA / 100

This returns the correct value without a problem.  I then set the name of this calculated cell as "Calc1" on the Binding tab.

I then try to set the value of the second cell, as above (from the Java Window) to be

FieldA - Calc1

However, I'm getting an error message saying that "Calc1 accessor is  unknown"

What is my mistake here?

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Depending on the name of the row, the following should do it:

Row2.FieldA - Row2.Calc1

View solution in original post

4 Replies

Avatar

Former Community Member

Sorry, I misread at first. If it's in another row, you may need to add the row identifier.

Message was edited by: westlakejager

Avatar

Former Community Member

It is in a different row.  I'm not really good with JavaScript, but the Calc1 is in Row 2, and Calc2 (the result I'm looking for) is in Row 3 of the table.

How would I set the correct command?

Avatar

Correct answer by
Former Community Member

Depending on the name of the row, the following should do it:

Row2.FieldA - Row2.Calc1

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