![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi Everytime I have a good idea, FM8.5 come right back at me and force me to forget about it.... I have a calculation field that return "text" inside that I have text with merge in a "date" like this cPPM_Expiration is a custom fonction OR I Also try a Calculation Field (date) Case ( cPPM_Expiration ? Get ( CurrentDate );TextColor("Contact will expired on " & Day (cPPM_Expiration) & " " & MonthName ( cPPM_Expiration ) & " " & Year ( cPPM_Expiration );RGB (115;150;115)); cPPM_Expiration < Get ( CurrentDate );TextColor ( "The contract is expired since " & cPPM_Expiration; RGB ( 255; 0 ; 0 ) ) ) and the first option bring the english month name....(I have a french XP version) and the second version, Date result is in this format mm/dd/yyyy... the problem is I use "Use system format" and I use a french version of XP and my setup is dd/mm/yyyy. All this "zipelido" is to get a Color text based on the result. I want to have a green text if the contract is valid and red text when expired. I also try to make the date field calculation result in color, but when a result is a "date" the color is gone but work in text result.... and I also whant to have a long date format in text.... dd mmmmm yyyy. And I don't whant to use the replace fonction every time I need to have french in my solution, this will make another and another and another to many calculation field ! Thank you JF |
#3
| |||
| |||
|
|
"JF" <bizouman_takethisout (AT) hotmail (DOT) com> schreef in bericht news:6VEPh.41935$VN1.493918 (AT) wagner (DOT) videotron.net... Hi Everytime I have a good idea, FM8.5 come right back at me and force me to forget about it.... I have a calculation field that return "text" inside that I have text with merge in a "date" like this cPPM_Expiration is a custom fonction OR I Also try a Calculation Field (date) Case ( cPPM_Expiration ? Get ( CurrentDate );TextColor("Contact will expired on " & Day (cPPM_Expiration) & " " & MonthName ( cPPM_Expiration ) & " " & Year ( cPPM_Expiration );RGB (115;150;115)); cPPM_Expiration < Get ( CurrentDate );TextColor ( "The contract is expired since " & cPPM_Expiration; RGB ( 255; 0 ; 0 ) ) ) and the first option bring the english month name....(I have a french XP version) and the second version, Date result is in this format mm/dd/yyyy... the problem is I use "Use system format" and I use a french version of XP and my setup is dd/mm/yyyy. All this "zipelido" is to get a Color text based on the result. I want to have a green text if the contract is valid and red text when expired. I also try to make the date field calculation result in color, but when a result is a "date" the color is gone but work in text result.... and I also whant to have a long date format in text.... dd mmmmm yyyy. And I don't whant to use the replace fonction every time I need to have french in my solution, this will make another and another and another to many calculation field ! Thank you JF Create your own calculation cMois <Text ; Choose ( month ( currentdate ) ; "" ; "Janvier" ; "Février" ; "Mars" ; "Avril" ; "Mai" ; "Juin" ; "Juillet" ; "Août" ; "Septembre" ; "Octobre" ; "Novembre" ; "Décembre") And use this as your base for the names. I don't think you are re-using those dates, so displaying them as text would be the solution an create no problems. I use numbers and dates as text all the time for displaying purposes. Keep well, Ursus |
#4
| |||
| |||
|
|
OK thank you, j'avais pas pensé d'utiliser cette fonction !! "Ursus" <ursus.kirk (AT) wanadoo (DOT) nl> a écrit dans le message de news: 460f76fe$0$55969$dbd43001 (AT) news (DOT) wanadoo.nl... "JF" <bizouman_takethisout (AT) hotmail (DOT) com> schreef in bericht news:6VEPh.41935$VN1.493918 (AT) wagner (DOT) videotron.net... Hi Everytime I have a good idea, FM8.5 come right back at me and force me to forget about it.... I have a calculation field that return "text" inside that I have text with merge in a "date" like this cPPM_Expiration is a custom fonction OR I Also try a Calculation Field (date) Case ( cPPM_Expiration ? Get ( CurrentDate );TextColor("Contact will expired on " & Day (cPPM_Expiration) & " " & MonthName ( cPPM_Expiration ) & " " & Year ( cPPM_Expiration );RGB (115;150;115)); cPPM_Expiration < Get ( CurrentDate );TextColor ( "The contract is expired since " & cPPM_Expiration; RGB ( 255; 0 ; 0 ) ) ) and the first option bring the english month name....(I have a french XP version) and the second version, Date result is in this format mm/dd/yyyy... the problem is I use "Use system format" and I use a french version of XP and my setup is dd/mm/yyyy. All this "zipelido" is to get a Color text based on the result. I want to have a green text if the contract is valid and red text when expired. I also try to make the date field calculation result in color, but when a result is a "date" the color is gone but work in text result.... and I also whant to have a long date format in text.... dd mmmmm yyyy. And I don't whant to use the replace fonction every time I need to have french in my solution, this will make another and another and another to many calculation field ! Thank you JF Create your own calculation cMois <Text ; Choose ( month ( currentdate ) ; "" ; "Janvier" ; "Février" ; "Mars" ; "Avril" ; "Mai" ; "Juin" ; "Juillet" ; "Août" ; "Septembre" ; "Octobre" ; "Novembre" ; "Décembre") And use this as your base for the names. I don't think you are re-using those dates, so displaying them as text would be the solution an create no problems. I use numbers and dates as text all the time for displaying purposes. Keep well, Ursus |
#5
| |||
| |||
|
|
Hi Everytime I have a good idea, FM8.5 come right back at me and force me to forget about it.... I have a calculation field that return "text" inside that I have text with merge in a "date" like this cPPM_Expiration is a custom fonction OR I Also try a Calculation Field (date) Case ( cPPM_Expiration ? Get ( CurrentDate );TextColor("Contact will expired on " & Day (cPPM_Expiration) & " " & MonthName ( cPPM_Expiration ) & " " & Year ( cPPM_Expiration );RGB (115;150;115)); cPPM_Expiration < Get ( CurrentDate );TextColor ( "The contract is expired since " & cPPM_Expiration; RGB ( 255; 0 ; 0 ) ) ) and the first option bring the english month name....(I have a french XP version) and the second version, Date result is in this format mm/dd/yyyy... the problem is I use "Use system format" and I use a french version of XP and my setup is dd/mm/yyyy. All this "zipelido" is to get a Color text based on the result. I want to have a green text if the contract is valid and red text when expired. I also try to make the date field calculation result in color, but when a result is a "date" the color is gone but work in text result.... and I also whant to have a long date format in text.... dd mmmmm yyyy. And I don't whant to use the replace fonction every time I need to have french in my solution, this will make another and another and another to many calculation field ! Thank you JF |
#6
| |||
| |||
|
|
In article <6VEPh.41935$VN1.493918 (AT) wagner (DOT) videotron.net>, "JF" bizouman_takethisout (AT) hotmail (DOT) com> wrote: Hi Everytime I have a good idea, FM8.5 come right back at me and force me to forget about it.... I have a calculation field that return "text" inside that I have text with merge in a "date" like this cPPM_Expiration is a custom fonction OR I Also try a Calculation Field (date) Case ( cPPM_Expiration ? Get ( CurrentDate );TextColor("Contact will expired on " & Day (cPPM_Expiration) & " " & MonthName ( cPPM_Expiration ) & " " & Year ( cPPM_Expiration );RGB (115;150;115)); cPPM_Expiration < Get ( CurrentDate );TextColor ( "The contract is expired since " & cPPM_Expiration; RGB ( 255; 0 ; 0 ) ) ) and the first option bring the english month name....(I have a french XP version) and the second version, Date result is in this format mm/dd/yyyy... the problem is I use "Use system format" and I use a french version of XP and my setup is dd/mm/yyyy. All this "zipelido" is to get a Color text based on the result. I want to have a green text if the contract is valid and red text when expired. I also try to make the date field calculation result in color, but when a result is a "date" the color is gone but work in text result.... and I also whant to have a long date format in text.... dd mmmmm yyyy. And I don't whant to use the replace fonction every time I need to have french in my solution, this will make another and another and another to many calculation field ! Thank you JF I can't see anything wrong with the main part of the text calculation. This: "Contact will expired on " & Day(cPPM_Expiration) & " " & MonthName(cPPM_Expiration) & " " & Year(cPPM_Expiration) should work perfectly, as long as cPPM_Expiration is a Date field or a Calculation field with a Date result. If cPPM_Expiration is a Text field, then using the MonthName function is meaningless. Take the colour-changing bits out and you should see that it works. Helpful Harry Hopefully helping harassed humans happily handle handiwork hardships ;o) |
![]() |
| Thread Tools | |
| Display Modes | |
| |