James Gill Posted January 31, 2008 Posted January 31, 2008 I am trying to create a script that will report when a record has been modified, and then display those results in another layout. So far I have everything working the way I want it to, with one exception. I want the script to automatically perform a search and display records that are modified, starting with today's date through seven days prior. I know I want to search a date range using the ... command, but where I'm running into problems is with current date minus the 7 days part of the search script. I can find records easily using //...1/21/08 in the record modified field(Using today's date as the current date) What I want the script to automatically enter is todays date, and then put whatever date was 7 days prior into the second date range automatically. Sorry if the wording is a little vague, I'll try to clarify if you guys have any questions.
comment Posted January 31, 2008 Posted January 31, 2008 See if this helps: http://www.fmforums.com/forum/showtopic.php?tid/192864/post/279629/#279629
James Gill Posted February 1, 2008 Author Posted February 1, 2008 (edited) All that does for me is get the current date, minus 7 days. i.e. 1/31/08-7 days=1/24/08(I specified the 7 part.) I need it to actually display the calculated result as the search criteria i.e. 1/31/08...1/24/08. I have a feeling I'm very close to being able to do this, but I haven't been using Filemaker that for that long. I have the correct result (7 days prior to todays date) but now I need it to actually put that date into the range. Basically, I need the result of that calculated field to display; "Get ( CurrentDate )" "..." & "Get( CurrentDate ) - 7" but when I do that I am getting an operator error Edited February 1, 2008 by Guest
comment Posted February 1, 2008 Posted February 1, 2008 (edited) I don't see why you need a range. Unless you have records that have been modified in the future, I would think that finding records whose modification date is equal to or greater than 7 days ago should be quite sufficient. It seems you have missed the comparison operator in the example (which needs to be reversed to suit your need) "≥" & Get ( CurrentDate ) - 7 Or, if you insist: Get ( CurrentDate ) - 7 & ".." & Get ( CurrentDate ) EDIT: Easy with the quotation marks - you only need them for literal text strings. Edited February 1, 2008 by Guest
Recommended Posts
This topic is 6140 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