April 5, 200124 yr I need help with a date query in CDML I have a 'dateadded' field in the FM4 database and I want to have the web page display new records in the last 30 days. Without using a script how can this be done directly in CDML ie) dateadded > currentdate - 30 I have tried <a href="FMPro?-db=database.fp5&-lay=forweb&-format=hitlist.htm&-error=error.html&dateadded>[FMP-currentdate]-30&-sortField=dateadded&-sortorder=descending&-find"> I am also wondering about the -op=gt function and if that might be the clue. Any help would be appreciated and if this is not possible in CDML - let me know as well. Cheers!
April 5, 200124 yr In URL you cannot use math expressions; the .gt. will work, but the > is way off required URL handling. [ April 05, 2001: Message edited by: Anatoli ]
April 6, 200124 yr Do the work in the database. Make a calc field that does the work: make a field named "expire" where expire If[ (Status(CurrentDate) - dateadded) > 30, "1", "0"] Now perform a search for expire=0.
April 6, 200124 yr Author All right I figured the '>' needed to be replaced by .gt. But... what is the code to get this function into cdml on my web page. dateentered > (currentdate-30) would it look like this? &dateentered.gt.[fmp-currentdate] Arrgh now how do I get the minus 30 day??? help -- this should be easy.
April 9, 200124 yr Author Thanks Vaughan, As always you are right to the point. I had figured I would have to create a calc field and do it in Filemaker - but just wish there was more power to do these calculations directly in CDML.
April 9, 200124 yr My 2 cents. You will discover the real Power of FM on web, when you will combine the powers. FM + WebCompanion (or Lasso) + HTML + CSS + JavaScript for start. I am almost tempted to recommend Switch from FM Client to Web Browser in some cases.
Create an account or sign in to comment