Newbies Travis-J Posted May 21, 2012 Newbies Posted May 21, 2012 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
mr_vodka Posted May 21, 2012 Posted May 21, 2012 Enter Find Mode [ ] Set Field [ Web Published; "Yes" ] Set Field [ DateStart; ">" & Get ( CurrentDate ) ] Perform Find [ ]
Newbies Travis-J Posted May 22, 2012 Author Newbies Posted May 22, 2012 Worked, like a charm. Thank you for your help.
Joost Miltenburg Posted May 22, 2012 Posted May 22, 2012 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 )).
mr_vodka Posted May 22, 2012 Posted May 22, 2012 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:
comment Posted May 22, 2012 Posted May 22, 2012 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now