Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Scripting Error for Calculating Columns

Avatar

Level 2

Hello,

I have created a table in which I need to sum the rows and columns.  The script is working for each row, but it is not for each column.  I've looked through this forum and found several examples that should work for me but I'm still receiving an error; accessor ... is unknown (where... is the path).  I would appreciate any assistance. ScriptError-1.jpg

7 Replies

Avatar

Level 2

Help?  Do I need to provide more information or the file?

Avatar

Level 10

I think you have a typo in your script.

The uses sum(form.page1...) but the name of your page is Page1 (first letter in upper case).

Avatar

Level 2

I just made the change as you suggested but it did not clear the error.  Would you have any other suggestions?

Avatar

Level 10

Hi,

without seeing the form, it not possible to say whats wrong.

Fact is, the path you use in the sum() function does not exist.

Upload your form somewhere and post a link here, so we can check it.

Avatar

Level 2

Thanks radzmar.  I hope I have given you access to the document.

http://https://docs.google.com/open?id=0BzzfBikvcraQeERNYnQydzQ4c3c

Message was edited by: AngelaC - to change link

Avatar

Level 10

Well,

as I said, the reference is wrong.

In your form, there is no row named "Row", but 4 rows named individually "Row1", "Row2" etc.

The script you use looks for all instances of a object named "Row"m this means Row[0], Row[1], Row[2] and so on..

So just rename all the 4 rows into "Row" and your script will work.

Avatar

Level 2

THANK YOU!!  From the example that I found to use for this, I did not realize the naming of the rows as they were.  Such a simple thing that has held me up for days.

Again, thank you!!