Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7914 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

Enter Find Mode

Insert Calculated Result [datefield, DateToText (date) & "..." & DateToText (date + 6)]

Perform Find

Posted

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?

Posted

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

Posted

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?

Posted

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 B)

setfield(g_enddate,g_startdate+6)

Find mode

Insert calculated result (matchdatecalc,1)

Perform Find

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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