hello,
i have a table with 3 different type of customers, for each type i wish to store 2 contact persons and 2 phone numbers.
because every field must have an unique caption i had to give the fileds names with number - contact1,contact2....contact6 and phone1...phone6, but it doesn't look good.
i wish to have for each type of customer - contact1,contact2 and phone1 and phone2, is there any way i can do it please?
Shay.
solution request for duplicate field caption
Re: solution request for duplicate field caption
One rule in database development is: don't repeat similar fields in the same table.
You should consider adding a
Then each customer may have 0 to n contacts.
Same with phone numbers. Add a table for phone numbers. Add a lookup column, referencing the parent contact. This means every contact may have 0 to m phone numbers.
You should consider adding a
contacts
table and use a lookup field for referencing your customers
table.Then each customer may have 0 to n contacts.
Same with phone numbers. Add a table for phone numbers. Add a lookup column, referencing the parent contact. This means every contact may have 0 to m phone numbers.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: solution request for duplicate field caption
Dear Jsetzer,
the feilds names are obviously diffrent , but why does the captions have to be diffrent?
shay.
the feilds names are obviously diffrent , but why does the captions have to be diffrent?
shay.
Re: solution request for duplicate field caption
Maybe because it would be confusing for the users and a "No Go" for developers to have different but similar fields in the same table with identical labels.
As mentioned above: Developers should always try to normalize databases. Normalization includes moving data of similar kind into a separate table.
Imagine, in a week or so, you need to store additional information per phone number, for example phone number type like "private", "office", "fax", .... if you have a separate table, it is just one more field. But if you follow your first idea, you'd need n more fields like phone_1_type, phone_2_type, phone_3_type, ... phone_n_type. So, there is good reason for normalizing tables. Any follow up change has to be made n times.
But if you really want identical labels, you can use Javascript on the <label/> elements and change every label's text.
From my experience I would avoid that on any cost for future options and better maintainability, but this is only my opinion.
As mentioned above: Developers should always try to normalize databases. Normalization includes moving data of similar kind into a separate table.
Imagine, in a week or so, you need to store additional information per phone number, for example phone number type like "private", "office", "fax", .... if you have a separate table, it is just one more field. But if you follow your first idea, you'd need n more fields like phone_1_type, phone_2_type, phone_3_type, ... phone_n_type. So, there is good reason for normalizing tables. Any follow up change has to be made n times.
But if you really want identical labels, you can use Javascript on the <label/> elements and change every label's text.
From my experience I would avoid that on any cost for future options and better maintainability, but this is only my opinion.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: solution request for duplicate field caption
dear Jsetzer,
ok understood, thank you very much.
ok understood, thank you very much.