Otopina: BDC Picker Pokazuje samo jedan stupac rezultata

U mojim o ovim pokušajima pružanje više koristan pretraživanje stupac pomoću 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".

Možete pristupiti berač klikom na otvorenoj knjizi ikonu u stupcu poslovnih podataka kao što je prikazano:

slika

The above image shows a business data column called "Master Document Id". That column is connected, putem 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" funkcija. Users select a "master" dokument i kada su spasiti, nekog događaja prijamnik kopije meta podataka polja iz navedenog majstora.

Po defaultu, the BDC picker looks like this when I search for a document whose ID = "38":

clip_image002

To je korisno, 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. Naslov) ali neće pokazati stvarni popis naslova se nalaze, Upravo njihova DocId kao je prikazano ovdje:

clip_image002[1]

(Zaslon metak nije tako velik, jer nisam pokupiti traži da se vraća nikakve valjane rezultate, ali možete vidjeti da li je pronašao neke rezultate, to bi samo pokazala DocId je, ne naslova).

I searched high and low for the answer to this and failed. Moj kolega, časni Jonathan Bradshaw, had faced and solved this issue. When I reached out to him for help, on mi je ukazao u pravom smjeru.

Configure the picker to show multiple columns via the "ShowInPicker" Objekt u ADF:

<Svojstvo Ime="ShowInPicker" Tip="System.Boolean">pravi</Svojstvo>

U detaljnije:

  <!-- Naslov -->
  <TypeDescriptor TypeName="System.String" Ime="Naslov" >
    <LocalizedDisplayNames>
      <LocalizedDisplayName LCID="1033">Naslov</LocalizedDisplayName>
    </LocalizedDisplayNames>
    <Svojstva>
      <Svojstvo Ime="DisplayByDefault" Tip="System.Boolean">pravi</Svojstvo>
      <Svojstvo Ime="ShowInPicker" Tip="System.Boolean">pravi</Svojstvo>
    </Svojstva>
  </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. U mom slučaju, BDC picker showed DocId by default. Međutim, once I added "ShowInPicker" na Naslov, DocId no longer displayed. I solved that by explicitly setting the ShowInPicker property for Doc ID.

Ovdje je rezultat:

slika

(I’ll explain the odd-looking "168 – CamlSchema.xsd" construction in a future blog post. In short, to ulančani niz koji omogućuje za nešto bolje korisničko iskustvo).

Naravno, nakon što je napisao ovaj blog post, I just did a search for "ShowInPicker" i pronašao brojne hitove, pa i ova: http://msdn2.microsoft.com/en-us/library/ms583986.aspx. It explains the meaning of that property along with some other good BDC stuff.

</kraj>

Pretplatite se na moj blog!

Technorati Tags:

4 misli o „Otopina: BDC Picker Pokazuje samo jedan stupac rezultata

  1. Jean-Marie

    Osuditi… Ovaj članak spasio mi puno vremena i moj uživo :-))

    Izvrstan post i vaš blog dodao u moj izbor. Usput, I found the article by googling "bdc could not find fields to insert all the identifier values" *lol* 😉

    Pozdrav, Jak

  2. juggler_10 1
    Vi ste pokriveni većinu pitanja sam naići u posljednjih mjesec dana, to je sjajno vidjeti ih na jednom mjestu. My question is how you are searching by more than one column in the picker. Nisam imao sreće uzimajući BDC pretraživanja po više od jednog stupca. Napravio sam nekoliko filtara i da mi daje drugu opciju u padajućem ali nisam bio u mogućnosti da se zapravo dobili da rade s upitom. A smjer će biti velik.
  3. Paul Galvin
    I found that once I searched for "showinpicker".
    I did all kinds of searching for a solution to this and couldn’t find anything until Jonathan Bradshaw told me how he solved it. Lots of hits on "ShowInPicker" but virtually nothing on "bdc data column shows only one column in web page dialog".
    I didn’t know what question to "ask" pa nije mogao dobiti dobar odgovor.
    Everyone should certainly look at bdc meta man. Hand crafting ADF files is not a good use of a human’s time, to je sigurno.

Dopust jedan Odgovor

Vaša email adresa neće biti objavljena. obavezna polja su označena *