May 21, 201213 yr Newbies 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
May 21, 201213 yr Enter Find Mode [ ] Set Field [ Web Published; "Yes" ] Set Field [ DateStart; ">" & Get ( CurrentDate ) ] Perform Find [ ]
May 22, 201213 yr 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 )).
May 22, 201213 yr 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:
May 22, 201213 yr 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.
Create an account or sign in to comment