asked on September 15, 2014
Hello,
I need to retrieve all the values for the "DV_Chassi" field using the Search SDK.
Looking at the image above, we see that the field has multiple values, but the value returned is only this "AS58A9S651E7FGTY8".
I am using the following code.
using (Search LFSearch = new Search(this.Repositorio.GetCurrentRepositorySession())) { LFSearch.Command = "{[]:[Status]<>\"04 Arquivar\"} & {[]:[Status]<>\"00 Pendencia\"} & {[]:[Status]<>\"07 Imagem Substituida\"} & {LF:Modified=" + '\u0022' + dataModificacao.ToString("MM/dd/yyyy") + '\u0022' + "}"; LFSearch.Run(); SearchListingSettings searchListingSettings = new SearchListingSettings(); searchListingSettings.AddColumn(SystemColumn.Id); searchListingSettings.AddColumn(SystemColumn.Name); searchListingSettings.EntryFilter = EntryTypeFilter.Documents; //Fields searchListingSettings.AddColumns(new List<string>() { "DC_CNPJ", "DD_CNPJ_CPF", "DV_Marca", "DV_Chassi", "DV_Modelo" }); List<ContratoSyncLaserfiche> listDocuments = new List<ContratoSyncLaserfiche>(); using (SearchResultListing searchResultListing = LFSearch.GetResultListing(searchListingSettings)) { int num = searchResultListing.RowsCount; for (int i = 1; i <= num; ++i) { // get the values formatted as strings; store the row ContratoSyncLaserfiche document = new ContratoSyncLaserfiche(); string id = searchResultListing.GetDatumAsString(i, SystemColumn.Id); document.EntryId = int.Parse(id.Replace(".", "")); document.Chassi = searchResultListing.GetDatumAsString(i, "DV_Chassi"); document.CNPJCredor = searchResultListing.GetDatumAsString(i, "DC_CNPJ"); document.Devedor = searchResultListing.GetDatumAsString(i, "DD_CNPJ_CPF"); document.Fabricante = searchResultListing.GetDatumAsString(i, "DV_Marca"); document.Modelo = searchResultListing.GetDatumAsString(i, "DV_Modelo"); listDocuments.Add(document); } } return listDocuments; }
How do I return all values?
"AS58A9S651E7FGTY8" and "8AJFZ29G8C6147999"
0
0