|
|
Change field font color wjen past due
Using FM Pro 7. I have two date fields. One indicates the date of the
last report filed (Last_Report) the other indicates when the next
report is due (Report_Due). Is there a way to automatically change the
font color in the Report_Due field from black to red when the
Report_Due date is >= todays date? I guess this would be done by a
script.
And is there a good reference on writing script anyone can recommend?
Thanks,
Glenn Humphrey
|
|
0
|
|
|
|
Reply
|
glennyc (7)
|
5/2/2004 1:45:54 PM |
|
Have you looked at Text Formatting Functions in Help?
Matt
"Glenn Humphrey" <glennyc@earthlink.net> wrote in message
news:2004050209451516807%glennyc@earthlinknet...
> Using FM Pro 7. I have two date fields. One indicates the date of the
> last report filed (Last_Report) the other indicates when the next
> report is due (Report_Due). Is there a way to automatically change the
> font color in the Report_Due field from black to red when the
> Report_Due date is >= todays date? I guess this would be done by a
> script.
>
> And is there a good reference on writing script anyone can recommend?
>
> Thanks,
> Glenn Humphrey
>
|
|
0
|
|
|
|
Reply
|
Matt
|
5/3/2004 12:39:14 AM
|
|
On 2004-05-02 20:39:14 -0400, "Matt Wills" <Im@Witz.end> said:
> Have you looked at Text Formatting Functions in Help?
>
> Matt
>
> "Glenn Humphrey" <glennyc@earthlink.net> wrote in message
> news:2004050209451516807%glennyc@earthlinknet...
>> Using FM Pro 7. I have two date fields. One indicates the date of the
>> last report filed (Last_Report) the other indicates when the next
>> report is due (Report_Due). Is there a way to automatically change the
>> font color in the Report_Due field from black to red when the
>> Report_Due date is >= todays date? I guess this would be done by a
>> script.
>>
>> And is there a good reference on writing script anyone can recommend?
>>
>> Thanks,
>> Glenn Humphrey
I am not that savy regarding FM. Looked at text formating functions,
but need some other help. Do I need to write a script to make this
happen? Where do I store or put this script. Do I need to change the
field type from date to caluclated?
Thanks
|
|
0
|
|
|
|
Reply
|
Glenn
|
5/4/2004 11:52:33 AM
|
|
"Glenn Humphrey" <glennyc@earthlink.net> wrote in message
news:2004050407515316807%glennyc@earthlinknet...
> On 2004-05-02 20:39:14 -0400, "Matt Wills" <Im@Witz.end> said:
>
> > Have you looked at Text Formatting Functions in Help?
> >
> > Matt
> >
> > "Glenn Humphrey" <glennyc@earthlink.net> wrote in message
> > news:2004050209451516807%glennyc@earthlinknet...
> >> Using FM Pro 7. I have two date fields. One indicates the date of the
> >> last report filed (Last_Report) the other indicates when the next
> >> report is due (Report_Due). Is there a way to automatically change the
> >> font color in the Report_Due field from black to red when the
> >> Report_Due date is >= todays date? I guess this would be done by a
> >> script.
> >>
> >> And is there a good reference on writing script anyone can recommend?
> >>
> >> Thanks,
> >> Glenn Humphrey
>
> I am not that savy regarding FM. Looked at text formating functions,
> but need some other help. Do I need to write a script to make this
> happen? Where do I store or put this script. Do I need to change the
> field type from date to caluclated?
>
> Thanks
>
Make the field a calculation, such as
DueDate =
If (
Report_Due>= Get(CurrentDate); TextColor(Report_Due;RGB(255;0;0));
TextColor(Report_Due;RGB(0;0;0))
)
In English:
If Report_Due is greater than or equal to today, display DueDate in red,
otherwise display in black.
Matt
|
|
0
|
|
|
|
Reply
|
Matt
|
5/4/2004 8:55:24 PM
|
|
> Make the field a calculation, such as
> DueDate =
> If (Report_Due>= Get(CurrentDate); TextColor(Report_Due;RGB(255;0;0));
> TextColor(Report_Due;RGB(0;0;0))
>
The help file doesnt do a very good job explaining RGB color space and
the TextColor function.
Another option that will produce the same results is:
TextColor(Report_Date; ((Report_Date>= Get(CurrentDate)) * 16711680))
You may want to consider adding a few global fields for commonly used
colors.
(Red=16711680 , Black=0, Green=65280, etc). There are lots of
reference tables on the net that show the RGB colors, names and codes.
--Christopher Jensen
cjensen@itpartners.cc
|
|
1
|
|
|
|
Reply
|
cjensen
|
5/5/2004 1:35:00 AM
|
|
|
4 Replies
673 Views
(page loaded in 0.079 seconds)
|
|
|
|
|
|
|
|
|