Tags:
create new tag
view all tags

SID-00765: How to update a "last updated date" field automatically

Status: Answered Answered TWiki version: Perl version:
Category: CategoryAutomation Server OS: Last update: 16 years ago

Is it possible to automatically update a field with the current timestamp after I edited any other field on the row? Thanks.

-- FrancisChung - 2010-02-25

Discussion and Answer

How to you compose that table?

1. If TWiki table populated by a custom template of CommentPlugin: You can add a hidden input field in the input template that contains a timestamp. Compare with EditActionItems

2. If you use the EditTablePlugin you can define a timestamp for new rows, but not when you change existing rows.

3. If you dynamically compose the table with a SEARCH that pulls topics containing a TWikiForm you can use the last update date of each topic. See TWikiForms, FormattedSearch, QuerySearch.

-- PeterThoeny - 2010-02-25

Yes, I am using the EditTablePlugin (second method as what you pointed out) to create the table. I have tried to use $EDITCELL{date} with a default=$date but it does not seem to work. Since I am new to twiki, I hope someone may have done this already. Thanks.

-- FrancisChung - 2010-02-25

Edit Tables are great for simple use cases. For more complex queries and interactions it is better to develop a TWikiForms based application.

-- PeterThoeny - 2010-02-25

After done few more searches, it looks like the $EDITTABLEROW{} may work for my case. Is there any example code which can be shared with me please? Thanks.

-- FrancisChung - 2010-02-26

Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the TWiki consultants if you need timely help. We invite you to get involved with the community, it is more likely you get community support if you support the open source project!

-- PeterThoeny - 2010-04-05

      Change status to:
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.
SupportForm
Status Answered
Title How to update a "last updated date" field automatically
SupportCategory CategoryAutomation
TWiki version

Server OS

Web server

Perl version

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2010-04-05 - 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.