Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Mirror formcalc result to another page and cell

Avatar

Level 2

I want to take the results of Page8.Table6.Row25.GrandTotal and display the result as read only in Page2.Table2.Row12.GrandTotal.

How do I do this?

Thank you in advance for your time and expertise.

Darrell

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

If you see my prev msg, i clearly stated that the piece of code should be placed on the layout:ready event of  Grand Total field on Page 8

I think the mistake you  have done is : you  haven't included the "TopmostSubform" name in the path.

However, you can add the following code on the layout:ready event of the "Grand Total" field on Page8.

TopmostSubform.Page2.Table2.Row12.GrandTotal.rawValue = this.rawValue;

Thanks,

VJ


View solution in original post

7 Replies

Avatar

Former Community Member

You can add the following script after calculating the Grand Total on Page 8:

Page2.Table2.Row12.GrandTotal.rawValue = Page8.Table6.Row25.GrandTotal.rawValue

Also, make the field GrandTotal on Page 2 as Read Only.

Thanks,

VJ

Avatar

Level 2

Thank you VJ! 

1) I tried adding the = line you mentioned in this cell Page8.Table6.Row25.GrandTotal

    

          Sum(Table6.Row24.SubTotal1+Table6.Row24.SubTotal2)

          Page2.Table2.Row12.GrandTotal.rawValue = Page8.Table6.Row25.GrandTotal.rawValue

          This disabled the sum script so I

2) I tried adding the = line you mentioned in this cell Page2.Table2.Row12.GrandTotal and selecting "initialize" in the show dropdown and used Javascript as the language.

But neither worked.  What am I missing?

Avatar

Former Community Member

Hi brainstewn,

I would like to take a look at the form.

Is it possible to share the form @ kvdvijaykumar@gmail.com  ?

Thanks,

VJ

Avatar

Former Community Member

Hi Brainstewn,

I think the mistake you  have done is : you  haven't included the "TopmostSubform" name in the path.

However, you can add the following code on the layout:ready event of the "Grand Total" field on Page8.

 

TopmostSubform.Page2.Table2.Row12.GrandTotal.rawValue = this.rawValue;

Thanks,

VJ

Avatar

Level 2

Hi VJ

I'm not sure where to place "TopmostSubform.Page2.Table2.Row12.GrandTotal.rawValue = this.rawValue;"  Do I place it in the cell on page 8 or page 2?  The cell in Page 8 is the one that calculates.  The cell on page 2 is what I want to mirror the cell calcuated using formcalc.

Avatar

Correct answer by
Former Community Member

If you see my prev msg, i clearly stated that the piece of code should be placed on the layout:ready event of  Grand Total field on Page 8

I think the mistake you  have done is : you  haven't included the "TopmostSubform" name in the path.

However, you can add the following code on the layout:ready event of the "Grand Total" field on Page8.

TopmostSubform.Page2.Table2.Row12.GrandTotal.rawValue = this.rawValue;

Thanks,

VJ


Avatar

Level 2

Thanks again VJ!

I learned that when I changed the Show dropdown to ' ALL EVENTS ' I could have code in both layout ready section and calculate, this worked, thank you for your patience!

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