LiveCycle Designer dynamic form/table with repeat rows and calculated total in footer - need code to turn total red if <>100, black if =100

167 views
Skip to first unread message

amy.k...@iowa.gov

unread,
Oct 5, 2017, 4:53:29 PM10/5/17
to Adobe LiveCycle Developers

I have a dynamic form with a table that uses a button with an instance manager to add rows and another to delete rows. The footer row has a field that calculates the total of fields in the rows above, and changes as the user enters entries, add/removes rows, changes entries. 

 

I would love to turn the text of the calculated total to red if it is <> 100, and back to black when it =100. 

 

I've tried all sorts of code in all sorts of events. Sometimes I can get the calculated total to turn red -- but the calculation won't work and it displays as zero. Mostly I just break the calculation and nothing happens at all after that. 

 

Name of field where user enters a number that is totaled in the footer row:

 form1.Mainsubform.Tablesubform.Table.TableREPEATROW.UserNumberSubform.UserNumberNumericField 

 

Name of field where total is calculated

 form1.Mainsubform.Tablesubform.Table.FooterRow.FooterRowNumericField

 

Code to calculate the total:

::calculate - (FormCalc, client)

sum(TableREPEATROW[*].UserNumberSubform.UserNumberNumericField[*])

 

This works fine to calculate the total in the footer. What code will change the font of that total to red if it is <>100 and back to black if it is =100, where do I put it, and is it JavaScript or FormCalc?

Reply all
Reply to author
Forward
0 new messages