This topic is locked

Total conditional formatting

5/3/2011 8:29:56 AM
PHPRunner General questions
E
epanc author

Hi,

on a list with total ("fields and order totals" - phprunner5.2) I would like conditional formatting in a different color if the total exceeds 100.

In "After record process" I quote:

if ($data ["perc_rip_total"]> 100)

$record ["perc_rip_total_style "].=' style =" background: yellow "';
does not work.
Thanks.

Sergey Kornilov admin 5/3/2011

You need to make sure syntax is correct. I.e. the should not be spaces between '$' and 'data'. 'Record' is incorrect to, should be 'record' (case-sensitive).
More info:

http://xlinesoft.com/blog/2011/01/03/tutorial_conditional_formatting/
If you have a valid support contract you can post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

E
epanc author 5/3/2011

Hi,

I checked, the syntax is correct. However, it does not work. At the moment I do not have a support contract. Thanks anyway

N
nti 5/8/2011

phpr 5.3 build 7474
Assuming "perc_rip_total" = FIELD_NAME
Compare your code with adjusted code.
And add bracket: }
YOUR CODE:



if ($data ["perc_rip_total"]> 100)

$record ["perc_rip_total_style "].=' style =" background: yellow "';


ADJUSTED CODE:



if($data["perc_rip_total"]> 100){

$record["perc_rip_total_style"]='style="background:yellow"';

}