August 16, 200718 yr Can someone take a look at my custom function here and tell me why my text wont turn red. The Daterequired field is a Date Field It worked if the Daterequired type was changed to text but it interfered with the Overdue code. If(finished = "no" and overdue = "overdue" ;TextColor ( Daterequired ; RGB (255 ; 0 ; 0) );Daterequired )
August 16, 200718 yr As far as I know, you still can't colorize date fields. I also question why you are using custom function for something which should (I believe) only apply to one table. If you would like to share more about what you are doing, we may be able to help you further. :wink2:
August 16, 200718 yr Author Well There is an Order layout and a scheduele layout. The Scheduele layout is nothing more than a portal layout that pulls from the orders layout. When i make the Finished field = No from the orders layout then the PO,Client name, Date ordered, DateRequired all show up on the scheduele layout which works nicely but i want to be able to say when the required date is past the date in the DateRequired field turns red so when i print out the scheduele for the boss and other people they can be alerted to the fact that the order isnt done and needs to be. I dunno how to go about doing this Thanks for any help
August 16, 200718 yr As you know, text field can have a colour... So add a new calculated text field ( name = date ), put it over the DateRequired field and make it "not enterable"; put this calc inside it: If( finished = "no" and overdue = "overdue" ; TextColor ( Daterequired ; RGB (255 ; 0 ; 0) );Daterequired )
August 16, 200718 yr Author Ok guy i got it to work thank you very much. one other question, why is it that when I click a date on the dropdown calender and say i accidently click the wrong date and its before the current date it doent turn red unless i open the calender again and pick the date. Same thing happens if i pick the correct date it stays red till i open the calendar and click it again how can i fix that so when i click a date it either goes red or stays black depending on what date i pick?
August 16, 200718 yr The calculation that you proposed do not depend from the current date... It evaluates only if you change fields: finished and overdue So give us your real calculation, please.
August 16, 200718 yr Author Case(finished = "no" and overdue = "overdue" ; TextColor (Daterequired ; RGB ( 255 ; 0 ; 0 ) ); TextColorRemove ( Daterequired ; RGB ( 255 ; 0 ; 0 ) ) )s that is my custom function
August 16, 200718 yr Ok, try this one. Case( finished = "no" and overdue = "overdue" or dateRequired < Get ( CurrentDate ); TextColor (Daterequired ; RGB ( 255 ; 0 ; 0 ) ); Daterequired ) BTW: this is a calculation, NOT a custom function... and TextColorRemove isn't needed
August 16, 200718 yr Author Now it just stays red wether or not the date is greater than or less than the current date and i made this calc into a custom function, not exactly sure why but i did but ill change it to a calc instead
Create an account or sign in to comment