This topic is locked

Change Row colours by date.

11/2/2009 5:11:27 AM
PHPRunner General questions
S
swanside author

Hello Again.
In my jobs table there is an Order_Date field, and Finished Checkbox.
If after 7 days, from the Order_Date, if the Finished Checked box has not been ticked, How can I make the row background row colour go yellow.

Then, If after 14 days from the Order_Date, If the finished checked box has not been ticked, How can I make the background Row colour go Red?
Cheers

Paul

J
Jane 11/2/2009

Hi,
use List page: After record processed event on the Events tab for this purpose.

Here is just a sample:

if ((strtotime("now")-strtotime($data["FieldName"]))/(60*60*24)>7)

$row["rowstyle"]='style="background:yellow"';
S
swanside author 11/4/2009

Hi Jane.
Thanks for the info, just one more thing, How do I only apply this code/action if the checkbox called finished is not checked?
Thanks

Paul



Hi,
use List page: After record processed event on the Events tab for this purpose.

Here is just a sample:

if ((strtotime("now")-strtotime($data["FieldName"]))/(60*60*24)>7)

$row["rowstyle"]='style="background:yellow"';


J
Jane 11/5/2009

Hi,
here is a sample:

if ((strtotime("now")-strtotime($data["FieldName"]))/(60*60*24)>7 && !$data["finished"])