Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

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!

Posted

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 ]

Posted

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.

Posted

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.

Posted

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.

Posted

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.

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