Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have created two ECTs, let's call them country and city for clarity. I have also created an association with city as the child and country as the parent. When I create an external list for city, it appears roughly as follows:

City                    Country
================        =================
London                  1
Manchester              1
New York                2
Los Angeles             2
Tokyo                   3

When I actually go in and edit an item, I get an ECT picker which allows me to pick using the friendly names (Great Britain, USA, etc.) thanks to the city-> country association. However, I would like the external list to also display the friendly name rather than the country ID, which is just a database autoincrement and not useful at all for the end user.

Note: I'm creating a SQL server ECT, with all operations being implemented with stored procs

share|improve this question

1 Answer 1

I solved this as follows:

In my Read Item stored procedure for the City ECT, I returned City, Country (the ID) and Country Description. In my Read List stored procedure for the City ECT, I returned only City and Country Description, so that the Read List displayed as:

City                    Country Description
================        ===================
London                  United Kingdom
Manchester              United Kingdom
New York                United States
Los Angeles             United States
Tokyo                   Japan

My experience is that the Read Item method must define all fields used in Read List, but the opposite is not true: Read List does not need to contain all of the fields that exist in Read Item.

share|improve this answer
    
Note: if you have caching enabled, this could create an issue, because the "calculated fields" - in this case, country description - will not be updated properly. –  Hutch Apr 7 '13 at 17:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.