sfgiantsjo Posted October 27, 2004 Share Posted October 27, 2004 I am trying to create a field that will auto-enter the text "valid" or "Expired" based on a date field in my database. How should I do this? I tried using a calculation IF(expdate>=12/1/2004,"valid","expired"), but that doesn't return anything into my field. Thanks for any advice! Link to comment Share on other sites More sharing options...
QuinTech Posted October 27, 2004 Share Posted October 27, 2004 Hi SFGiants, and welcome to FM Forums! First step, instead of "12/1/2004" (which Filemaker reads as "twelve divided by 1 divided by 2004") , use "Date ( 12 , 1 , 2004 )". Second, make sure expdate is a date field. If those don't work, try creating an unstored calculation field and using the same calculation. If that doesn't work, it may have to do with the way your auto-enter is executed. HTH, Jerry Link to comment Share on other sites More sharing options...
Lee Smith Posted October 27, 2004 Share Posted October 27, 2004 Hi sfgiant, You are close. I prefer the case, it is easier to read, and understand. Case(expdate >= Date(12, 1, 2004),"valid","expired") HTH Lee Link to comment Share on other sites More sharing options...
Lee Smith Posted October 27, 2004 Share Posted October 27, 2004 Hi Jerry, You are just too quick in typing. Link to comment Share on other sites More sharing options...
sfgiantsjo Posted October 27, 2004 Author Share Posted October 27, 2004 Woo-Hoo! That worked! Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 7092 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