getting calculated fields to appear red when negative
I cannot figure out how to keep the calculated cells updating as the data they depend on changes, and also get the font to change color if the sum goes below zero, especially since I am using two different languages. Help!
You are right ...so change the color command to FormCalc. It is only the if statement that needs to change the rest remains the same.
if(tFY10.rawValue<0) then tFY10.font.fill.color.value="255,0,0" endif
tFY10 is the field this code is associated with. The column above is called FY10 and includes one or more rows in a dynamic table. If the code above is entered, the calculation works, but the coloring effect is always "one step behind" - i.e the first time I enter numbers above that make the result negative, nothing happens, but the next time it will turn red if the sum stays negative. However, if I reverse the lines of code, the calculation never executes (and $0 always shows in tFY10). I can't find any variation that works.
Disregard - I figured it out. It took a bit more code than I anticipated. Here's an example from one of the data entry cells:
//data entry cell
if (FY10.rawValue<0) then FY10.font.fill.color.value="255,0,0"
if (form1.Table1.Row1.FYDP.rawValue<0) then FYDP.font.fill.color.value="255,0,0"
if (form1.Table1.FooterRow.tFY10.rawValue<0) then form1.Table1.FooterRow.tFY10.font.fill.color.value="255,0,0"