Automatic Translations (Powered by Powered by Google):
Afrikaans Albanian Arabic Belarusian Bulgarian Catalan Chinese Croatian Czech Danish Dutch English Estonian Filipino Finnish French Galician German Greek Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Taiwanese Thai Turkish Ukrainian Vietnamese Welsh Yiddish
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Guest Member James50 is on a distinguished road
    Join Date
    Jan 2010
    Posts
    3
    Location:
    USA


    FM Version
    Filemaker Pro 10 Advanced
    Skill Level
    Entry Level
    OS
    Windows
    Rep Power
    0

    Red face Comparing dates and auto filling another field based on the result

    Hi !
    I hope I explain this well enough for someone to help me. I have a field (MembExpDate) that contains a membership date - such as 02/20/2010. I would like to check the membership date against the current date to see if it is plus or minus 30 days and enter $30 into another field (Dues_Amount) if it is and leave it blank if it isn't. This is what I've tried but it doesn't work. This is probably obvious to everyone except me!

    Dues_Amount
    Case ( Get (CurrentDate) - MembExpDate < 1 ; "" ;
    Get (CurrentDate) - MembExpDate > 1 ; 30 )

    Any help would be greatly appreciated.
    Thanks,
    Jim

  2. #2
    FileMaker Mentor AHunter3 has much to be proud of AHunter3 has much to be proud of AHunter3 has much to be proud of AHunter3 has much to be proud of AHunter3 has much to be proud of AHunter3 has much to be proud of AHunter3 has much to be proud of AHunter3 has much to be proud of AHunter3 has much to be proud of AHunter3 has much to be proud of AHunter3 has much to be proud of
    Join Date
    Aug 2006
    Posts
    8,033
    Location:
    New York (Manhattan) USA


    FM Version
    10, 9, 8.5, 8, 7, 6, 5.5., 5, 4.1, 4, 3, 2.1, 1, II; & Nashoba 4, Plus, and the Original
    Skill Level
    Developer
    OS
    Windows & Mac
    Rep Power
    156

    Re: Comparing dates and auto filling another field based on the result

    I don't see anything wrong with your formula; the one thing you need to know about calc fields that reference "status" functions such as Get (CurrentDate) or Get (SystemPlatform) and so forth is that you have to set the storage (via the storage tab in the field definition of that field) to "unstored — calculate as needed"; if you do not, it will not notice when the "current date" changes; it will not roll over and therefore will not "work".

    This means you can't use such a field on the remote side (portal side, right hand side, etc) of a relationship because an unstored field cannot be indexed. But as long as that was not your intention (e.g., you intended to do a standard FIND for expired dates, or just to have them display onscreen), that change by itself should put you in business.

  3. #3
    Guest Member James50 is on a distinguished road
    Join Date
    Jan 2010
    Posts
    3
    Location:
    USA


    FM Version
    Filemaker Pro 10 Advanced
    Skill Level
    Entry Level
    OS
    Windows
    Rep Power
    0

    Re: Comparing dates and auto filling another field based on the result

    AHunter3,
    I didn't have it set to unstored but even when I make that change it doesn't work. The funny thing is I have 2 records that have the dates of:
    11/03/2008 and
    11/22/2009
    These show the $30.00 amount in the proper field like I want. Others that have Feb. 7, 2010 and such show blank. I realize I'm missing something but I can't figure out what it is.
    Thanks for your help. Any other suggestions?
    Jim

  4. #4
    FileMaker Mentor AHunter3 has much to be proud of AHunter3 has much to be proud of AHunter3 has much to be proud of AHunter3 has much to be proud of AHunter3 has much to be proud of AHunter3 has much to be proud of AHunter3 has much to be proud of AHunter3 has much to be proud of AHunter3 has much to be proud of AHunter3 has much to be proud of AHunter3 has much to be proud of
    Join Date
    Aug 2006
    Posts
    8,033
    Location:
    New York (Manhattan) USA


    FM Version
    10, 9, 8.5, 8, 7, 6, 5.5., 5, 4.1, 4, 3, 2.1, 1, II; & Nashoba 4, Plus, and the Original
    Skill Level
    Developer
    OS
    Windows & Mac
    Rep Power
    156

    Re: Comparing dates and auto filling another field based on the result

    Quote Originally Posted by James50 View Post
    I have 2 records that have the dates of:
    11/03/2008 and
    11/22/2009
    These show the $30.00 amount in the proper field like I want.
    Yes, as I would expect.


    Others that have Feb. 7, 2010 and such show blank.
    I would expect that as well.



    I realize I'm missing something but I can't figure out what it is.
    I am realizing that *I* am missing something: an example of a date that gives you a result that you did not expect or that you consider to be wrong?

  5. #5
    Guest Member James50 is on a distinguished road
    Join Date
    Jan 2010
    Posts
    3
    Location:
    USA


    FM Version
    Filemaker Pro 10 Advanced
    Skill Level
    Entry Level
    OS
    Windows
    Rep Power
    0

    Re: Comparing dates and auto filling another field based on the result

    AHunter3,
    I got it to work! I had to change the formula to this:
    Case(MembExpDate - Get (CurrentDate) < 30; "30";
    Get (CurrentDate)- MembExpDate > 30; "30")
    I'm not sure I completely understand why but when I check it out using different data it works. If you see a major flaw in this please let me know.
    Thanks a lot,
    Jim

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads - The answer to your question may be in one of these posts!

  1. Auto field filling
    By timsonefelt in forum Calculations and Define Fields
    Replies: 4
    Last Post: 05-07-2009, 11:15 AM
  2. Auto Filling line items based on master record?
    By RichGags in forum FileMaker Pro 9
    Replies: 8
    Last Post: 10-14-2008, 10:37 AM
  3. Field Validation based on result
    By orangej in forum FileMaker Pro 9
    Replies: 3
    Last Post: 01-06-2008, 12:20 AM
  4. Auto Filling 3rd conditional field
    By DOS in forum Value Lists
    Replies: 4
    Last Post: 11-27-2006, 12:52 AM
  5. Automatically filling in a field based on the user
    By PMR in forum FileMaker Pro 7.0
    Replies: 2
    Last Post: 06-08-2005, 02:33 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts