FileMakerDoh!!! Posted March 17, 2003 Posted March 17, 2003 I'm trying to build a date find script; I've had no luck finding info. I would like to enter Monday's date and get records for the following 6 days (until sunday). The general find part of the script is easy; I will grab it from filmaker6 template. But when I enter the date how do I tell it find the next 6 days? Thanks, JP
Fitch Posted March 17, 2003 Posted March 17, 2003 Enter Find Mode Insert Calculated Result [datefield, DateToText (date) & "..." & DateToText (date + 6)] Perform Find
FileMakerDoh!!! Posted March 17, 2003 Author Posted March 17, 2003 Thanks for the reply. I'm getting errors when building the calculation though. This is what I have: NextPrintingDate, DateToText (date) & "..." & DateToText (date + 6) NextPrintingDate is a calculated field and is the field I am looking up. What did I do incorrectly?
Fitch Posted March 17, 2003 Posted March 17, 2003 Doh!!! Sorry, I misled you a little bit. The coffee is kicking in now. The problem is that a field's data is no longer available in Find mode. The exception is Global fields. So, make a global text field, gTxt. Set Field [gTxt, DateToText (date) & "..." & DateToText (date + 6)] Enter Find Mode Insert Calculated Result [datefield, gTxt] Perform Find
FileMakerDoh!!! Posted March 17, 2003 Author Posted March 17, 2003 Thanks, but I still dont' seem to get it to work.
RussBaker Posted March 18, 2003 Posted March 18, 2003 Tom's will work. Have you made sure you're not restoring any find requests in your Enter Find Mode and Perform Fnid script steps? They must both end with a [] when you look at them in the scriptmaker window. Have you made sure that the datefield field is on the layout you are in when performing the script?
Ugo DI LUCA Posted March 18, 2003 Posted March 18, 2003 Another method you could use if you often perform the same find is having a set of 2 global date fields g_start and g_end: create a matchdatecalc = Case(d_date<=g_end and d_date>=g_start;1;0). Use these globals on a specific layout. Then search for matchdatecalc = 1. If you really always need to find for a range of six days, then enter date in g_startdate and use script setfield(g_enddate,g_startdate+6) Find mode Insert calculated result (matchdatecalc,1) Perform Find
Ugo DI LUCA Posted March 18, 2003 Posted March 18, 2003 Have you made sure that the datefield field is on the layout you are in when performing the script? Yep.
FileMakerDoh!!! Posted March 24, 2003 Author Posted March 24, 2003 Thanks for all the posts. I miss type the info, Oops. I have a new problems that I encountered with my find script though. Hear's my new problem to solve! * I have a frequency field: daily weekly, monthly, etc... * I have a Printing date field: this field contains the date the job was actually printed. * I have a Calculated printing Date Field: It calculates from the above two fields when the job should print next. Hear's my problem, Since the Calculated printing Date Field only gives the "immediate next" printing date I can't find a printing date after. For example: Job A is a daily job it printed 24/03/03 Job B,C,D are weekly jobs and they where also printed on 24/03/03. When I perform my script to find what will be printing next week all I get are the weeklies. Also, if I perform a find for 2 weeks in advance I don't find anything! How should I define my frequency field for me to view all possible printing dates? Cheers, JP
Recommended Posts
This topic is 7914 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