DanMarks Posted November 8, 2010 Posted November 8, 2010 I'm building a ordering system on filemaker and have the following two fields.. Date From Date To Date To obviously should never be smaller than Date From What I would want to do is put a script into Date To so that it checks if Date To is smaller than Date From and if it is, set it to the same value as Date From. I have tried using the standard if smaller than calculation but obviously the date is in the wrong format (25/10/2011) for that to work. Anyone any ideas on if there is a way to get that date into the format 20111025 so that the calculation would work? Or if there is a better way to do this. Thanks in advance, Cheers, Dan
Raybaudi Posted November 8, 2010 Posted November 8, 2010 What I would want to do is put a script into Date To so that it checks if Date To is smaller than Date From and if it is, set it to the same value as Date From. Hi you do not need a script but a calculation to put into the "Date To" option for auto-enter a value, something like this: Case( Self < Date From ; Date From ; Self )
comment Posted November 8, 2010 Posted November 8, 2010 I have tried using the standard if smaller than calculation but obviously the date is in the wrong format (25/10/2011) for that to work. If Date From and Date To are both date fields containing valid dates, then: Date To < Date From should work fine - regardless of the date format being used.
comment Posted November 8, 2010 Posted November 8, 2010 a calculation to put into the "Date To" option for auto-enter a value, something like this: Case( Self < Date From ; Date From ; Self ) I don't think I would like this as a user: suppose Date From is April 23. Date To is supposed to be November 15, but I have mistyped and entered January 15. Instead of getting a warning, my input is converted to April 23. I might not even notice this - and if I do, I have to retype the correctly entered day too.
Raybaudi Posted November 9, 2010 Posted November 9, 2010 I agree. There is even a worst side effect: entering a date into Date From while Date To is empty forces Date To to show the same date of Date from.
Recommended Posts
This topic is 5186 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