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
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
--
EricCharikane - 10 Oct 2007
Answer
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