October 31, 200025 yr Novice question here. I'm trying to query a set of records from a database based on four criteria. 1). The complete flag is checked. 2). The ID is relevant to the query. 3). The Publish Date is today or has past. 4). The Publish time has also past on the Publish Date. The first two are easy - via a nested FMP-if:.and. statement but I cannot seem to get a response for the others when I use CurrentDate and CurrentTime. Any ideas? Many thanks. Gary
November 3, 200025 yr Do it in the databse rather than in CDML: make an unstored calculation field that does the work. Say we call the field PDcheck... If[PublishDate > Status[CurrentDate], "0", "1"] ...then you've just gotta use the CDML in your formay file... [FMP-If: PDcheck.eq.1][/FMP-If] Ditto for current time... do the calculation in the database and use the calc field in the CDML format file.
November 3, 200025 yr The astute FMP function-o-philes would have realised by now that the function could be simplified to... Not (PublishDate > Status[CurrentDate]) I dunno whether this would be a faster calculation, it might be because (technically) it is simpler.
November 3, 200025 yr Author Thanks Vaughan. I've also just discovered that using the -op variable to state that the date has to be equal to and less than today followed by date=// also works. Is there a greater performance overhead doing it this way via a CDML URL? [This message has been edited by gary jones (edited November 03, 2000).]
Create an account or sign in to comment