Gossamer Forum
Home : Products : DBMan : Customization :

Lost Fields

Quote Reply
Lost Fields
I have just modified my html.pl with the blank field mod (taken from resources where it appeared in a JPD posting on 4th May 1999).

This appeared to work well, and blank fields were correctly omitted from the long form display.
I have just discovered, however, that during a "list all" request, the short form display is showing an inconsistency. Only the second page of ten records is affected. What is happening to the fourth to tenth record is that the third field record is appearing in the second field, and subsequent fields move up one place. All subsequent pages are fine.
I have checked the database file for errors, and there are none - in fact the long form display of these fields is perfectly correct.
Could the code for the blank fields be causing this. I have used the following code surrounding my html table code:

|;
if ($rec{'Fieldname'} gt $db_defaults{Fieldname}) {
print qq|

[html]

|;
}
print qq|

I have only applied this code to the long form html because there is no need for it in the short form.
Maybe this old code has been superseded, and I missed it.

I am baffled and would appreciate help.

Thanks


David Olley
Anglo & Foreign International Limited,
Winchester
England
Quote Reply
Re: Lost Fields In reply to
My old databases still have the code that you use, but the newer code being used is now:

|;
if ($rec{'Fieldname'}) { print qq| $rec{'Fieldname'} |; }
print qq|

Whenever I have had problems with the short display such as yours it usually has been a corrupted database.

Please check your database again and be sure all the fields are in their proper place. It helps to look at the long display of the record just before the one not displaying correctly, as it's been the one I've messed up somehow.

Hope this helps :)

Quote Reply
Re: Lost Fields In reply to
Thanks, Lois, for the later mod. I will try it, though it seems unlikely that this is the problem if you are using it successfully.

I take your point about the database itself. This is what is weird, though. The long form display of the db is perfect throughout. The short form records affected are only from 4 thru' 10. 1 thru 3 and 11 onwards (to 578) are fine. I can't imagine how an error can be so specific to these records. In addition, the font size of the displaced records has been changed!
This makes no sense to me. If there was an html error, then every record would reflect it. If there was a database error, then the long form would show it.

I have been carefully checking everything since my first post but can find nothing wrong.

Cheers


David Olley
Anglo & Foreign International Limited,
Winchester
England
Quote Reply
Re: Lost Fields In reply to
Very odd. In adding some more conditional fields, the problem has gone away, even though these fields are not related. The mod does not even do what I intended. But the short form display is now OK.

I am now trying to prevent the display of a field if the contents of another field are blank. I assumed that I could use the same code, but it is not working yet.
I now have to leave the office and resume tomorrow (UK time).

Cheers


David Olley
Anglo & Foreign International Limited,
Winchester
England