JasonT
-
8/21/2012 11:43:49 AM
Document Type using ID instead of name
Hi all, I'm having a bit of an issue with the name of a document type I have created. It keeps using the ID of a drop-down control instead of the value. Here's what I have set up:
2 custom tables - one named Addresses (w/fields ItemID, AddressTitle, Address1, Address2), the other named PhoneNumbers (ItemID, Phone, PhoneType) - Under the Search fields tab, AddressTitle and Phone are set as the Title field, respectively
1 Document Type named Address (w/fields AddressList, PhonesList) that I'm planning on using to associate several phone numbers with an address - AddressList uses "SELECT ItemID, AddressTitle FROM customtable_Addresses ORDER BY AddressTitle ASC" as its data source - PhonesList uses "SELECT ItemID, Phone FROM customtable_PhoneNumbers ORDER BY Phone ASC" as its data source
When I create a new Address in a folder it shows the address and phone information correctly. So I select an address from the drop-down and select the phone numbers associated with that address from the phones list-box.
However, when I hit Save it creates the new Address using the ItemID from the Address drop-down as its name rather than the AddressTitle. I have selected AddressList in the Document name source field, but am not sure how to set AddressTitle as the name of the new Address.
Ideas?
P.S. - Looking forward a little towards the goal of this, I'm planning on using this Address in another document type named Services.
What I'm thinking is that the user will select a drop-down of the address they want to associate w/a particular service. That selection will then (somehow) populate another drop-down with all of the phone numbers that have been associated with that address, allowing the user to pick the correct phone numbers for that particular service.
So my other question here is, is this the proper way of setting this up in Kentico or is there a more efficient way?
Thanks!
|