Question
It is desired to have a single page of user contact information in a table format of name, phone number, office, etc.
We started with just a Contacts topic page, and created a table and filled everything in. However, as we add users, they don't always know to add their data to the Contacts page. Some users update the Contacts page, and not the Users Directory, some vice-versa. Now we have two sources of data, neither of which is entirely correct.
Is it possible to use the data from the Users lists to create the Contacts page, and update that table automatically when someone updates their profile in Users? That would give us a one page printable directory list for quick reference purposes.
I have searched the support questions concerning users and found nothing in this area.
- TWiki version: 01 Feb 2003
- Perl version:5.6.1
- Web server & version: Apache
- Server OS: Red Hat 7.3
- Web browser & version:
- Client OS:
--
MichaelBarnes - 26 Jul 2003
Answer
You can build the contact page automatically with an embedded
FormattedSearch. Here is an example for TWiki.org (only the "Aa"s since there are so many users). Write:
%SEARCH{ "\* Name\: Aa" web="Main" regex="on" nosearch="on" header="| *Name* | *E-mail* |" format="|[[$web.$topic][$pattern(.*?\*.*?Name\:\s*([^\n\r]+).*)]] |$pattern(.*?\*.*?Email\:\s*([^\n\r]+).*) |" }%
To get this:
Number of topics: 54
TWikiRegistrationFormUseWebForms suggests to moving the user home data into
TWikiForms. That would make it easier to pull user data for reporting, e.g.
$formfield(Name) instead of
$pattern(...)
--
PeterThoeny - 26 Jul 2003