Jump to content

Writing a Script Help--Find Function


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

Recommended Posts

I just got a book "FileMaker 8 Funcations and Scripts" and it show the SET FIELD function for scripts in a find. I have tried using this with ScriptWriter but have not been able to duplicate the format. If there a way I can write a script free hand in FM or do I have to use the script writer?

When using the script writer I specify the field but can not include the action to take. I go to calculations and can not get it to do what I want there because it is wanting () and the book shows brackets [] around the set.

I am trying to find items with a date and time.

This is an example of what I am trying to do

#Find payments entered prior to 15:00 hrs on the current day with a payment date of the next day

ENTER FIND MODE

SET FIELD [CURRENT DATE;">// 15:00:**"]

SET FIELD [PAYMENT DATE;"=//+1"]

PERFORM FIND

ENTER BROWSE MODE

ENTER PREVIEW MODE [PAUSE]

Any help would be greatly appreciated

Scott

Link to comment
Share on other sites

You'll need to use ScriptMaker, and select each script step from the list.

For your Set Field [] steps, try using get(currentdate) instead of the // shortcut. Something like:

Set Field [ Payment Date ; get(currentdate) + 1 ]

The = is not necessary to get a match in Date, Time, or Number fields.

As for your other Set Field [], I'm afraid I can't tell what you're trying to do there. Is Current Date supposed to be a Timestamp field?

Link to comment
Share on other sites

Scott,

Just to clarify...

// Is used to comment out a line in the calculation dialog rather than to search for the current date as it is in find mode.

But if you really want to place that text from a calc. dialog into a field in find mode, you'll have to enclose the literal text in quotes "//"

The problem with your calculation is that you're placing the literal text of a calculation in a field and expecting it to evaluate.

Link to comment
Share on other sites

This topic is 5742 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
 Share

×
×
  • Create New...

Important Information

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