I do not understand your question. Could you make an example?
-- PeterThoeny - 16 May 2002
Ok. I will explain you in details.
I have an topic called TimeSheet.Whenever someone edit's the Timesheet topic, I will concate it with the current date and time and make a new Topic.
eg TimeSheet30/05/20022:30
-- AshishMishra - 30 May 2002
I made a shell (bash) CGI script for a related problem:
The library here wanted to manage people request via wiki. The solution was to create links
"Create new demand" that would trigger a CGI script to:
Create a new topic with a ID number appended to it, from:
A template stored as a Wiki Topic
The next availaible ID number stored as another Wiki Topic
redirect the browser to an URL editing the newly created topic
I think the same method can be applied to your problem with a "new timesheet" link.
-- ColasNahaboo - 30 May 2002
If you use a form to create a new topic name you can use the %GMTIME% variable to compose the topic name, e.g.
You write: <input name="topic" type="text" value="TimeSheet%GMTIME{"$year$mo$day$hour$min$sec"}%" />
You get: <input name="topic" type="text" value="TimeSheet20260111024647" />
Or, you could use %SEARCH% and the SpreadSheetPlugin to generate an autoincremented number based on the last entry.
-- PeterThoeny - 31 May 2002
How?
-- FritzBosch - 25 Jul 2002
A live example of a form that creates a date/time stamped topic can be seen over in TWikiTemplates.
-- DrewCard - 26 Jul 2002
I was actually referring to the " %SEARCH% + SpreadSheetPlugin autoincremented number" method
-- FritzBosch - 26 Jul 2002
Assuming you have topics named MyTicket1000, MyTicket1001, MyTicket1003:
Do a FormattedSearch for "MyTicket1" with scope="topic" in reverse order, and limit="1". The formatted search is simply format="$topic"
Place that search in a TWiki table cell. The cell has now for example MyTicket1025.
Apply a formula to increment the number by one. This is %CALC{"MyTicket$INT( $T(R1:C1) + 1 )"}% assuming the search is in R1:C1.
Here is an example table (with a hardcoded topic name instead of a search):
This table can be in hidden in HTML comments; it should be located before your form.
At last, in the hidden form field defining the topic name refer to the table cell that contains the formula, e.g.:
<input name="topic" type="text" value="MyTicket%CALC{"$T(R2:C1)"}%" />
-- PeterThoeny - 01 Aug 2002
From above, this looks like the start of something neat:
You get: <input name="topic" type="text" value="TimeSheet20260111024647" />
Which displays:
But which doesn't show up with the trailing question mark that you could click on to create a new page. Should it? If not, is there a way to make the question mark appear so that you could create the page with one more click / step? Or a way to create the page totally automatically (or go to the edit or create page screen)?
-- RandyKramer - 01 Aug 2002