Clarity

Expand all | Collapse all

PowerFilter - dateMacro

  • 1.  PowerFilter - dateMacro

    Posted Mar 29, 2011 09:12 AM

    OK in https://communities.ca.com/message/2301787#2301787 we discovered the undocumented dateMacro syntax for deriving today's date in a Clarity portlet's power-filter;

    maxad wrote:

    project.schedule_finish >= dateMacro("today")

    My question is then, is there any other usages/parameters for dateMacro that anyone has come across?

    (I'm trying to construct a bit of a "start-of-this-week" power-filter expression - so I'm optimistically imagining things like dateMacro("Last Monday") (which clearly doesn't work!))

    --

    Indeed, if there are other "hidden" power-filter macro's floating about that anyone knows about, that would be nice too? B)

     

    Message was edited 19/9/14 -  updated old thread link (Jive problems)



  • 2.  RE: PowerFilter - dateMacro
    Best Answer

    Posted Mar 29, 2011 09:20 AM
    Sorry, I appear to have answered my own question within 5 minutes of poking about in the server code; :*)

    it looks like we can also use;

    currentDay
    prevDay
    nextDay
    currentYear
    currentQuarter
    currentMonth
    currentWeek <---- so thats the one I'm after :grin:
    prevYear
    prevQuarter
    prevMonth
    prevWeek
    nextYear
    nextQuarter
    nextMonth
    nextWeek

    as the dateMacro("***") parameter.


  • 3.  RE: PowerFilter - dateMacro

    Posted Oct 09, 2011 05:02 PM
    Hello Dave,

    This was very helpful. Thank you for this.

    Do you have a list of other undocumented functions for Power Filters?

    Cheers
    Jimmy


  • 4.  RE: PowerFilter - dateMacro

    Posted Oct 09, 2011 10:16 PM
    THIS THREAD
    must be
    "Power Filter help with expression"
    2301793

    Martti K.


  • 5.  RE: PowerFilter - dateMacro

    Posted Oct 10, 2011 04:07 AM
    ^ Re:link

    The boards are being funny again ; I've corrected the link, the only thing I needed to correct was changing HTTP to HTTPS - the path was always correct.

    --

    @Jimmy, is this not good enough for you :tongue
    it looks like we can also use;
    currentDay
    prevDay
    nextDay
    currentYear
    currentQuarter
    currentMonth
    currentWeek
    prevYear
    prevQuarter
    prevMonth
    prevWeek
    nextYear
    nextQuarter
    nextMonth
    nextWeek


  • 6.  RE: PowerFilter - dateMacro

    Posted Oct 10, 2011 05:15 AM
    When are they not ;-) ?

    This morning I was trying to see post
    SQL Update Table Help Waiting for an Answer TomConnery 8 4089 Date: 10/10/11 6:55 AM By: Jimmy
    but when I opened the trread there was no such post.

    Martti K.


  • 7.  RE: PowerFilter - dateMacro

    Posted Oct 10, 2011 05:38 AM
    ^ I saw your other post on that;

    I have seen problems with the forums indexing when a post is made in Draft - it seems to still appear in the board index, so perhaps if the user abandoned the post the index still contains it????

    I have also seen problems when I delete a post the board index still contains a reference to it - perhaps this happened to Jimmy????

    Flaky then! :unsure:


  • 8.  RE: PowerFilter - dateMacro

    Posted Oct 10, 2011 01:39 PM
    Apologies Martti.

    As I quickly found the answer to my question in the earlier post, I thought I'd delete it without anyone knowing :*)

    I then saw the item in the news feeds and tried to remove it from there but in vain.

    Thanks Dave and Martti.


  • 9.  RE: PowerFilter - dateMacro

    Posted Oct 10, 2011 09:50 PM
    No problem, the same has happened to me, but the next post on the thread removes the problem.
    I just wanted point out the problem.

    That is one of the things in addition to getting the posts in chronological sequence that needs to be fixed.

    Martti K.


  • 10.  RE: PowerFilter - dateMacro

    Posted Jan 29, 2012 09:29 AM
    I added some examples with dateMacro on my blog.

    See: dateMacro examples


  • 11.  RE: PowerFilter - dateMacro

    Posted Apr 04, 2013 11:27 AM
    That was a great blog entry.
    I saw it a year ago.
    Did not make any sort of a record of it and did not see again until now.

    Martti K.


  • 12.  RE: PowerFilter - dateMacro

    Posted Oct 10, 2011 07:02 PM
    awesome Dave, thanks!