Tags:
create new tag
view all tags

Question

Dear all I'm really stick with this obvious question !

I am using a form with a field type of date to setup a topic type as a meeting. I want to list those meetings using a formatted search and sort them using the meeting starting date. I thought this was an obvious thing but it isn't ! I didn't find anyway to do that.

The field type date in a form is not a date it's only a string, so using this in the order="...." of the formatted search only return a sort based on the strings with is not what I want. I then try using order="$percntCALC{$quot$TIME($formfield(MeetingStartDate))$quot}$percnt but it gave nothing frown

So here is my question :

  • Do you know any way to sort a formatted search result based on a date field ?

And a second one related to the first one :

  • Is there any way to use a formatted search to list only upcoming meetings or past meetings ?

Thank you for any help,

Regards, Eric

Environment

TWiki version: 4.2 b2
TWiki plugins: Only default plugins
Server OS: ubuntu 6.06 LTS
Web server: Apache 2
Perl version: 5.8.7
Client OS: ubuntu 6.06 LTS
Web Browser: Epiphany (Gnome)
Categories: Platform, Missing functionality, Plugins

-- EricCharikane - 10 Oct 2007

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

Dear all, As a workaround, the dates can use the format yyyy/mm/dd. But this has a serious drawback which is that you are stuck in this format and can't use a format like 11 oct 2007. Any other idea to find a more robust solution ? Regards, Eric

-- EricCharikane - 11 Oct 2007

The TablePlugin sorting supports several date formats, including 11 Oct 2007. You can sort a search result with a %TABLE{}% variable preceding the SEARCH, specifying the sort column and sort order.

On upcoming or past meetings, you can do a SEARCH format="" with conditional text. Untested example:

format="$percntCALC{$IF($TIME($formfield(Date)) > $TIME(), <nop>, | $topic | $formfield(Date) |)}$percnt"

For search hits you want to suppress, output a <nop>, those lines get removed completely, merging table rows between search hits.

-- PeterThoeny - 14 Oct 2007

Change status to:
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2007-10-14 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.