tbeidler Posted April 6, 2001 Posted April 6, 2001 I would like to display a date on a page in red if the job is incomplete and the due date is passed the current date. Here's my code. [FMP-If: Field:due_date .gt. CurrentDate] [FMP-If: Field:status .neq. done] <td><font face="verdana,arial,helvetica" size=1 color=FF0000>[FMP-Field: due_date] </font></td> [/FMP-If] [FMP-Else] <td><font face="verdana,arial,helvetica" size=1>[FMP-Field: due_date] </font></td> [/FMP-If] Doesn't seem to work. Any ideas?
Keith M. Davie Posted April 7, 2001 Posted April 7, 2001 You need to SIMPLIFY. [FMP-If: Field:status .neq. done] <td><font face="verdana,arial,helvetica" size="1: color="#FF0000">[FMP-Field: due_date]</font></td> [FMP-Else] <td><font face="verdana,arial,helvetica" size="1">[FMP-Field: due_date] </font></td> [/FMP-If] Peace Keith [ April 06, 2001: Message edited by: Keith M. Davie ]
tbeidler Posted April 7, 2001 Author Posted April 7, 2001 But that won't do what I'm looking for. Your code would make everything marked done black and everything else red. I'm trying to flag items that are not complete or "done" and their due date has been passed. So if the due date is 10 April and the status is incomplete, on 14 April the date will display black but on 9 April it will be red. If the status is "done" the date will display black no matter what the date is. Hope this makes more sense. Thanks Keith.
Keith M. Davie Posted April 7, 2001 Posted April 7, 2001 Did you then try the reverse order of <td> lines: [FMP-If: Field:status .neq. done] <td><font face="verdana,arial,helvetica" size="1">[FMP-Field: due_date] </font></td> [FMP-Else] <td><font face="verdana,arial,helvetica" size="1: color="#FF0000">[FMP-Field: due_date]</font></td> [/FMP-If] or changing the parameter: [FMP-If: Field:status .eq. done] <td><font face="verdana,arial,helvetica" size="1: color="#FF0000">[FMP-Field: due_date]</font></td> [FMP-Else] <td><font face="verdana,arial,helvetica" size="1">[FMP-Field: due_date] </font></td> [/FMP-If] Peace Keith
tbeidler Posted April 7, 2001 Author Posted April 7, 2001 Maybe I'm missing something. Isn't your code checking the status only? I need to check the status and the date relative to the date the page is displayed.
Keith M. Davie Posted April 7, 2001 Posted April 7, 2001 "I'm trying to flag items that are not complete or "done" and their due date has been passed." Ah, I missed that. Yes, the code I was suggesting would show the due date of a job which was "in process" in red, otherwise the job's due date would be in black since we are really checking the status of the jobs in order to flag the due date by color. Now this color condition will be true whether today is (1) before the due date, (2) the due date or (3) past the due date. If the field status does not equal "done" display the data in field duedate in red else (the job is done) display the data in field duedate in black end-if Why would you want to show the status of a job in progress in black just because today is prior to the due date? If shown in black by that date condition, won't someone think the status is complete and therefore does not need to be worked on? If what you really want to check are just those jobs which are past due and incomplete, then you need to do a search for just those records using those criteria - a totally different process. You need to identify the actual goal you are attempting to achieve. Peace Keith
tbeidler Posted April 9, 2001 Author Posted April 9, 2001 All I'm tying to do is flag jobs incomplete and passed their due date. The only part that doesn't seem to work is this code; [FMP-If: Field:due_date .gt. CurrentDate] I got it to work using another approach but it required an additional calculation field which displays a 1 if the due date is less then today and a 0 if not. Then I used this code; [FMP-If: Field ast_due .eq. 1] [FMP-If: Field:status .neq. done] <td><font face="verdana,arial,helvetica" size=1 color=FF0000>[FMP-Field: due_date] </font></td> [/FMP-If] [FMP-Else] <td><font face="verdana,arial,helvetica" size=1>[FMP-Field: due_date] </font></td> [/FMP-If] Works fine but I don't like having to add an additional field to the database.
Recommended Posts
This topic is 8698 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now