Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Colour change on Calculated field

$
0
0

I have a calculated field: TotalDiff. It is the sum of amounts in repeating subforms. I want this calculated amount to display in red if it is a negative amount. I have used FormCalc as this was the only way I could figure out how to sum the amounts from the repeating subforms. I have never used FormCalc before and cannot figure out how to do the font colour change. From reading other discussion threads, I thought the following should work, but it doesn't. The sum formula works fine by itself, but when I add the if/else for the font colour, even that stops working. Where am I going wrong?

 

 

 

 

  form1.TotalBlock.TotalDiff::calculate - (FormCalc, client)

 

TotalDiff = Sum(ItemBlock[*].Diff)

 

if (form1.TotalBlock.TotalDiff.rawValue<0) then form1.TotalBlock.TotalDiff.font.fill.color.value="255,0,0"

else form1.TotalBlock.TotalDiff.font.fill.color.value="0,0,0"

endif


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>