Jump to content
Sign in to follow this  
sfgiantsjo

Help with auto-enter calculation

Recommended Posts

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!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Hi sfgiant, smile.gif

You are close.

I prefer the case, it is easier to read, and understand.

Case(expdate >= Date(12, 1, 2004),"valid","expired")

HTH

Lee

cool.gif

Share this post


Link to post
Share on other sites

Hi Jerry,

You are just too quick in typing.

tongue.gif

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.