Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Writing a Script Help--Find Function

Featured Replies

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

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?

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.

Would this be a spot where you'd use the Insert Calculated Value script step?

David

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.