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

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

Recommended Posts

  • Newbies
Posted

First off, I am very new to FileMaker, but want and need to learn. I am trying to create a script that will check if one field has a Yes entry and will also only return entries for an event that is in the future. I have been trying multiple solutions using the Get ( CurrentDate ) function but still have had no luck. Here is one of a couple of scripts I have tried that won't work for me. The scripts will narrow down the "Web Published" Field but I can't get the > CurrentDate to work.

Go to Layout [ "LayoutX" (EVT)]

Enter Find Mode [Restore] - (specified to EVT::Web Published: [=Yes]

Insert Calculated Result [select; Date Start 1; " > " & Get ( CurrentDate )]

Perform Find []

Any help would be appreciated.

Thanks,

Travis

Posted

Enter Find Mode [ ]

Set Field [ Web Published; "Yes" ]

Set Field [ DateStart; ">" & Get ( CurrentDate ) ]

Perform Find [ ]

Posted

Don't use 'Insert Calculated Result'.

It is a function that stems from FM version 3 ( maybe earlier ). I have never found a good reason to use it. In the case of dates I'd create a calculation of the date field and store the result as a number. Searching would then just be ">" & Getasnumber( Get ( CurrentDate )).

Posted

In the case of dates I'd create a calculation of the date field and store the result as a number. Searching would then just be ">" & Getasnumber( Get ( CurrentDate )).

:why:

Posted

I'd create a calculation of the date field and store the result as a number.

There is no need for such calculation; setting a date field to ">" & Get ( CurrentDate ) will work just fine.

In fact, I don't see why the script in the original post shouldn't work too. The improvements suggested by John are just that; they should not have such a dramatic effect.

This topic is 4568 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.