Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...
|
Re: Re: subfield function and creating a record inanotherusing data link.: msg#00048
db.dataperfect.general
|
Subject: |
Re: Re: subfield function and creating a record inanotherusing data link. |
|
Since we are throwing coins into the problem, my
two cents is that you should never have a Primary Key (unique field or
combination of fields that describe a record eg for linking) that has any
meaning.
Linking on the (LastName, Firstname) pair is bound
to cause you problems, if not today it will tomorrow or the next day. A
typo, a spelling mistake, a marriage, a change of name, two John James
Brown's - any of those things will create a problem. I know putting a
Cascade on the link can marginally overcome some of those issues, but it is
far better to have something meaningless like an artificially created ID
number, an::IN (or other techniques described in Ralph Alvy's book) would
be far better.
Additionally apart from the confusion it can cause,
linking on that combination will be wasteful. You say your mainfield on P1 does
double duty as a "Company Name" field so you will need to allow at least say 60
bytes eg A60 format, which will mean every time it is used in an index another
60 bytes is used. An ::IN field will consume about 8 bytes. Ultimately complex
applications will have many panels, with often two or three indexes, and since
in each you will probably want to put the Primary key to ensure uniquesness of
the index, you could find yourself with a 5 panel application with say 3
indexes consuming almost a kilobyte of indexing per record as opposed to about
120 bytes. It also really sucks to have your index file larger than your
data files.
Larger indexes make the application
slower.
The suggestion of splitting the LastName, Firstname
pair on P1 rather than in the target panel causes an additional problem. Since
the MainField on P1 might not contain a persons name but could contain a
company, if you were to parse the data entry to Last Name, First Name fields,
then in the case of company the one of those field will be blank. It is never a
good idea to include an empty field in the field set making up the Primary Key.
Unless you have some very exotic reason to do so, I
think you should avoid linking on LastName, Firstname. You will save confusion,
disk space, and processing time.
Regards
Brian
----- Original Message -----
Sent: Tuesday, August 21, 2007 4:24
AM
Subject: Re: [Dataperf] Re: subfield
function and creating a record inanotherusing data link.
Hi, Victor,
Just my 2 cents worth - I would probably make
hidden fields in the original data entry panel with formulas that break out
the name into first and last, and then make the panel links back and forth
between the 2 panels on those hidden fields, rather than the whole name
field.
Laurie
----- Original Message -----
Sent: Monday, August 20, 2007 7:39
AM
Subject: Re: [Dataperf] Re: subfield
function and creating a record in anotherusing data link.
Ralph,
Thank you for the reply. I am not worried about
the data entry (as only I will be using the database). The field in the
first panel is more of a display name and can contain the name of
companies.
As to your second point, you are right about the
misdiscription of the panel link but I just entered here for the purpose of
an example.
However, what I am doing, is it achievable in the way I
am doing it?
Victor Warner.
Ralph Alvy wrote:
Victor Warner wrote:
I would like to know if the following is possible:
1. I have two panels. The first panel contains a field ("MainField")
where I enter the name of a person in the following format:
Smith, John James
Atberg, Mary Jane
etc
2. In the second panel I have contact details for the person with
separate fields for first name, last name and so on
3. I have created a data link from MainField in panel 1 to the last
name field in the second panel with Prompt Create set. I have tested it
and it works. Ie when typing in a name in the first panel a record is
created in the second panel.
4. In the second panel I have created the required panel link to the
first panel and in the last name field I have entered a subfield
function to use only the last name from "Smith, John James":
subfield[P1F1;",";1]
but it does not work. Whether with or without this function, I still get
"Smith, John James" in the second panel last name field.
Is what I wish to do achievable and am I doing it in the right way?
Help with this would be greatly appreciated.
Victor Warner.
A couple of points...
1. Don't you worry about sloppy data entry in Panel 1? You're relying on the
data entry person entering the comma, etc. It seems to me to be safer to
have them enter Last Name, First Name, Middle Name in separate fields, and
let a formula in the another field join them if want.
2. subfield[P1F1;",";1] doesn't look right. The first argument should be a
field grabbed via a link. Something like this:
subfield[P2F10P1F1;",";1]
where P2F10 is the link that takes you to Panel 1.
_______________________________________________
Dataperf mailing list
Dataperf-Ii8YPGKeNuMyuW1uK6fEew@xxxxxxxxxxxxxxxx
http://lists.dataperfect.nl/mailman/listinfo/dataperf
_______________________________________________ Dataperf mailing
list Dataperf-Ii8YPGKeNuMyuW1uK6fEew@xxxxxxxxxxxxxxxx http://lists.dataperfect.nl/mailman/listinfo/dataperf
_______________________________________________ Dataperf mailing
list Dataperf-Ii8YPGKeNuMyuW1uK6fEew@xxxxxxxxxxxxxxxx http://lists.dataperfect.nl/mailman/listinfo/dataperf
|
_______________________________________________
Dataperf mailing list
Dataperf-Ii8YPGKeNuMyuW1uK6fEew@xxxxxxxxxxxxxxxx
http://lists.dataperfect.nl/mailman/listinfo/dataperf
| |