I mo iarrachtaí ar siúl ag soláthar colún lookup níos úsáidí ag baint úsáide as BDC, I hit a wall with the BDC picker. If you haven’t see it, the BDC picker is similar to a people picker except that it works with columns of type "business data".
Tá tú rochtain a fháil ar an roghnóir trí chliceáil ar an deilbhín leabhar a oscailt an colún shonraí gnó mar a thaispeántar:
The above image shows a business data column called "Master Document Id". That column is connected, via BDC, to a web service. The web service returns two columns of information: Document ID and Title. The business purpose here is to provide a "this document is based on" fheidhm. Users select a "master" doiciméad agus nuair a shábháil siad, ócáid glacadóir cóipeanna réimsí sonraí meta ón mháistir tagairt.
De réir réamhshocraithe, the BDC picker looks like this when I search for a document whose ID = "38":
Sin cabhrach, but not good enough. People don’t think in terms of IDs, they think in terms of titles and/or other meta data. The picker allows you to search on other columns (e.g. Teideal) ach ní bheidh a thaispeáint ar an liosta iarbhír na teidil go raibh sé, ach a n-DocId atá mar a thaispeántar anseo:
(Níl an lámhaigh scáileán chomh mór toisc nach raibh mé ag piocadh cuardach go bhfilleann aon torthaí bailí, ach is féidir leat a fheiceáil más rud é go raibh fuair sé roinnt torthaí, bheadh sé léirithe amháin DocId ar, Ní teidil).
I searched high and low for the answer to this and failed. Mo chomhghleacaí, an venerable Jonathan Bradshaw, had faced and solved this issue. When I reached out to him for help, Dúirt sé liom sa treo ceart.
Configure the picker to show multiple columns via the "ShowInPicker" maoin sa ADF:
<Maoin Ainm="ShowInPicker" Cineál="System.Boolean">fíor</Maoin>
I níos mine:
<!-- Teideal -->
<TypeDescriptor TypeName="System.String" Ainm="Teideal" >
<LocalizedDisplayNames>
<LocalizedDisplayName LCID="1033">Teideal</LocalizedDisplayName>
</LocalizedDisplayNames>
<Airíonna>
<Maoin Ainm="DisplayByDefault" Cineál="System.Boolean">fíor</Maoin>
<Maoin Ainm="ShowInPicker" Cineál="System.Boolean">fíor</Maoin>
</Airíonna>
</TypeDescriptor>
Setting this property does introduce a minor problem. As soon as you set it once, you need to set it for every column you want to show. I mo chás, BDC picker showed DocId by default. Mar sin féin, once I added "ShowInPicker" Theideal, DocId no longer displayed. I solved that by explicitly setting the ShowInPicker property for Doc ID.
Seo é an toradh:
(I’ll explain the odd-looking "168 – CamlSchema.xsd" construction in a future blog post. I mbeagán focal, tá sé ina teaghrán concatenated a ligeann le haghaidh taithí úsáideora beagán níos fearr).
Ar ndóigh,, tar éis scríofa iontráil seo blog, I just did a search for "ShowInPicker" agus fuair amas iomadúla, lena n-áirítear an ceann seo: http://msdn2.microsoft.com/en-us/library/ms583986.aspx. It explains the meaning of that property along with some other good BDC stuff.
</deireadh>
Liostáil le mo bhlag!
Clibeanna Technorati:
BDC