Gossamer Forum
Home : Products : DBMan : Customization :

Archiving Records

Quote Reply
Archiving Records
Okay...I love this script. It is working just fine for our Employee Directory (although I am still experimenting with off-line editing of the database).

I am in the process of creating a second database for our HR Job Hot-Line. What I would like to do is add the ability to archive records after a certain date and then re-active them if the job re-opens. I believe that this could be acccomplished by adding in date sub-routines and also creating a tmp data file. But I am unclear on how to do this.

Does anyone have ideas or suggestions on how I can do this??? Any mods for this would be most appreciated.

Thanks for your help in advance.

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Archiving Records In reply to
A lot depends on how you want to do the archiving. Do you need it to be automatic, or would it be all right to just click a link to create the archive?

Are you sure you need to do it this way? I think the same thing could be accomplished by having a hidden field on your search form which would allow only current records returned from a search. That way, you wouldn't have to schlep records back and forth between databases.


------------------
JPD





Quote Reply
Re: Archiving Records In reply to
A Hidden field would work, I guess. There would have to be a way to indicate records as "Active" (Current) and "Archive" (Old). A toggle option within the script and forms would be nice. Then only "Active" Records would be shown through the search form.

Is there a way to do this??



------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Archiving Records In reply to
To have the searches only return records that are "Open" add a hidden field to the html_view_search subroutine.

After

<input type=hidden name="uid" value="$db_uid">

add

<input type="hidden" name="Status value="Open">

To make your "List All" work like you want it to change the line in sub html_footer:

print qq!| <A HREF="$db_script_link_url&view_records=1&$db_key=*&Status=Open">List All</A> ! if ($per_view);

Change Status above to match your field name.

With this, regular searches will only return records with a status of "Open," but if someone does a search to delete or modify records, this won't be a factor.



------------------
JPD





Quote Reply
Re: Archiving Records In reply to
You could either do that -- which would require an "admin" only toggle to set each record -- or, if you wanted to just show records that had been added or updated within a certain length of time, it would be automatic.

I'll be glad to help you with the latter option if you're interested.


------------------
JPD





Quote Reply
Re: Archiving Records In reply to
Hello again. I guess I would like to do a combination of options of that you've suggested. I have completed the customization on the Job Hot Line script.
I added a pull-down menu option for "Status" with two OPTIONS: "Open" and "Closed".

What I'd like to do is only have those records that are "Open" to be listed via the search option AND the "List All" option. But I would like to have the data manager and administrator to access all records and update them as needed.

Does this make sense? If so, I would greatly appreciate a mod for addressing these functions.

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Archiving Records In reply to
This is a reminder of where to put the hidden field codes in your VIEWING sub-routines...MAKE SURE THAT YOU ALSO KEEP YOUR CODES CONSISTENT BETWEEN SUB-ROUTINES. This means that if you use the above code for "archiving" or hiding old records, make sure that you also put the code into the sub html_view_failure.

I totally forgot to do this and I just realized (after releasing the script to the general public) that I neglected to use the same code for the html_view_failure, which meant that even the default user was able to see ALL the records.

Just a friendly reminder....



------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us