Wiz Bang Computers Posted March 17, 2006 Posted March 17, 2006 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
Ender Posted March 17, 2006 Posted March 17, 2006 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?
Reed Posted March 17, 2006 Posted March 17, 2006 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.
T-Square Posted March 17, 2006 Posted March 17, 2006 Would this be a spot where you'd use the Insert Calculated Value script step? David
Recommended Posts
This topic is 6828 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