Gossamer Forum
Home : Products : DBMan : Customization :

Table Modify

Quote Reply
Table Modify
Hi has anyone done up a mod for editing a group of records. When we do a search and it brings back x number of records we would like to edit these records from a table view. Some what like editing via a spreadsheet.

Quote Reply
Re: Table Modify In reply to
I copied the subroutines from Links (with a few modifications). There is a file at http://www.jpdeni.com/dbman/Mods/multmod.txt.

Please let me know if it works.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Table Modify In reply to
Ok done this but am getting date error format when I submitt a modifcatione
This the error message;

The following records were not successfully modified: 509:
Date (Invalid date format


Also what would I change to get this in a column format?

Quote Reply
Re: Table Modify In reply to
Is the date empty on the record?

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Table Modify In reply to
no the date is there and in the format 01-Apr-2000

Quote Reply
Re: Table Modify In reply to
One other question -- Does this happen with all the records your modifying, or just one?

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Table Modify In reply to
All

Quote Reply
Re: Table Modify In reply to
Try adding

my (%rec) = @_;

to the beginning of sub validate_record and then change every instance of

$in to $rec

just within that subroutine!!

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Table Modify In reply to
the date one is fixed now I get these errors

The following records were not successfully modified: 509:
Invite (Invalid format)
Validated (Invalid format)


Quote Reply
Re: Table Modify In reply to
Did you change

($db_valid_types{$col} && !($rec{$col} =~ /$db_valid_types{$col}/)) and

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Table Modify In reply to
Thanks my error.

Works great now do think it is possible to have the editable search results in a column format instead of the form format?

One other question we are asked if it would be possible to have have the users database so one could work on it offline. I can't think of a way except to do up a program in access to access the database and then copy and check it to the online file. The customer wants to take the online database and put it on his laptop when he is one the road and work on it, but the trouble is if someone adds data to the online database everything would get screwed up. Plus because dbman runs from scripts my only option to put in on a laptop would be like I said earlier is to create a access form, and then create a script that would read the remote database and check it against the online database. Something like that, let me know if you have any ideas.

Again thanks for you help so far, impressive.

Quote Reply
Re: Table Modify In reply to
In Reply To:
do think it is possible to have the editable search results in a column format instead of the form format?
I don't understand. If you said "...possible to have the search results in a column format..." I would say yes, absolutely. But I don't know about "editable search results."

As for your other question, yes, someone could work on the database offline by a number of different ways. But, as with any database, it is unwise to have more than one copy of the database, either of which could be edited. If the guy with the laptop works on the file and then uploads the file, it would wipe out any changes that had been made since downloading the file.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Table Modify In reply to
Two things
What i mean by editable results in a column format is instead of having each record in a form have each record so that is in one row ie if there is 10 records there would be 10 rows. I guess it would look like edited a spread sheet.

Question 2

A couple of posts ago you had me add the following

Try adding

my (%rec) = @_;

to the beginning of sub validate_record and then change every instance of

$in to $rec

just within that subroutine!!

Now I am trying to implement the following

if ($data[1] eq $in{'Lastname'})
{
return "duplicate entry"; }

in the same routine but when I do it doesn't work unless I change the validate_record back $rec to $in

the following link is a duplicate record routine I think you were helping on

http://webmagic.hypermart.net/dbman/field33.txt


Jason

Quote Reply
Re: Table Modify In reply to
Displaying search results with one record per row is no problem. I still don't know what you mean by "editable." Isn't that what the "multiple mod" mod does?

To display one record per row, take a look at my "spreadsheet" mods -- http://www.jpdeni.com/...ods/spreadsheet.html. There are four different permutations there, depending on what you want to do.

Regarding your other problem, if it works with $in, use $in.

JPD
http://www.jpdeni.com/dbman/