Setting an existing field as a lookup field via VisualStudio
-
Well, I've got a list with contactpersons depending on a contenttype which extends the Contact-contenttype. I've got another list with customes (firms) which extends the basetype element. Both lists are generated via xml in a VisualStudio-Project, because it will be used in multiple websitecollections. Now I want to link the "company" field in the contactperson-list with the customer-list and lookup the values already established there. I'm able to generate a new field for example "My Company" and lookup the values in the customer-list, but when I try to set the already existing company-field as a lookup-field linked with the customer list, I get an error. The same when I leave xml and programm it in C#. Is it possible to do what I want? Perhaps not, because it's a SharePoint-Field and it's not designed to be a loopup-field. So do I have to generate a "new" company field, with a name like "My lookedup company-field from the customed-list, as it's not possible or I'm to stupid to link the existing customer-field"? Well that would be a solution but the name is sooooo long. ;) Regards, Ingo
------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.
-
Well, I've got a list with contactpersons depending on a contenttype which extends the Contact-contenttype. I've got another list with customes (firms) which extends the basetype element. Both lists are generated via xml in a VisualStudio-Project, because it will be used in multiple websitecollections. Now I want to link the "company" field in the contactperson-list with the customer-list and lookup the values already established there. I'm able to generate a new field for example "My Company" and lookup the values in the customer-list, but when I try to set the already existing company-field as a lookup-field linked with the customer list, I get an error. The same when I leave xml and programm it in C#. Is it possible to do what I want? Perhaps not, because it's a SharePoint-Field and it's not designed to be a loopup-field. So do I have to generate a "new" company field, with a name like "My lookedup company-field from the customed-list, as it's not possible or I'm to stupid to link the existing customer-field"? Well that would be a solution but the name is sooooo long. ;) Regards, Ingo
------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.
Uh, I've found the answer. When I use the webbrowser to do changes on the list I can't change the "Company"-field to a lookup-field, too. It's not envisaged to do that. So the answer is that I have to create a new field and (for example) hide the existing one. :sigh: With a little contemplation I would have sift it out before writing the question and perhaps I wouldn't have spend four hours on testing. But on the other side, perhaps someone will have the same question so I didn't deleted it and just answered it on myself. (I give it a five ;P )
------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.