[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Inf-IT DAVcl] Formatted Name


  Hello all,

  The “Formatted Name” field of contacts is not used. Our problem is that we have a very big addressbook, and all contacts only have Formatted Name (no Last Name nor First Name).

  Attached is a patch that adds a field named “Display Name”, as most carddav clients call it, that is displayed in the contact window and editable. It is also used by default in the contact list.

  Warning: it has not been extensively tested (and only with Davical as a server), but it seems to work well.

  It would be very interesting for us if it could be tested by more people and eventually included in an official release.

  Best regards,

-- 
Jean-Philippe Garcia Ballester
Demo-TIC
diff --git a/addressbook.js b/addressbook.js
index fcde7ef..c778829 100644
--- a/addressbook.js
+++ b/addressbook.js
@@ -787,6 +787,20 @@ function AddressbookList()
 		}
 		var allOrgArr=this.getABCompanies(false);
 
+		// FN attribute
+		while((vcard_element=tmp.match(vCard.pre['contentline_FN']))!=null)
+		{
+			// parsed (contentline_parse) = [1]->"group.", [2]->"name", [3]->";param;param", [4]->"value"
+			var parsed=vcard_element[0].match(vCard.pre['contentline_parse']);
+
+			if(isDataColumnDefined('DISPLAYNAME')) {
+				setContactDataColumn(inputContact, 'DISPLAYNAME', vcardUnescapeValue(parsed[4]));
+			}
+
+			// remove the processed parameter
+			tmp=tmp.replace(vcard_element[0],'\r\n');
+		}
+
 		// N attribute
 		while((vcard_element=tmp.match(vCard.pre['contentline_N']))!=null)
 		{
diff --git a/cache.manifest b/cache.manifest
index 973f958..c8eeb01 100644
--- a/cache.manifest
+++ b/cache.manifest
@@ -1,5 +1,5 @@
 CACHE MANIFEST
-#V 20150922153011
+#V 20160323165119
 
 CACHE:
 addressbook.js
diff --git a/config.js b/config.js
index ff4502d..6301ce0 100644
--- a/config.js
+++ b/config.js
@@ -1091,8 +1091,7 @@ var globalAddressCountryFavorites=[];
 //   the resulting value for FN will be: 'Lastname Firstname' and not
 //   'Lastname  Firstname' (two spaces), because the middle name is empty (so
 //   the second element is completely ignored /not added into FN/).
-// NOTE: this attribute is NOT used by this client, and it is also NOT
-// possible to directly edit it in the interface.
+// NOTE: this attribute is used by this client, under the name 'DisplayName'
 // Examples:
 //   var globalContactStoreFN=[' last', ' middle', ' first'];
 //   var globalContactStoreFN=['last', ', middle', ' ,first'];
@@ -1137,6 +1136,7 @@ var globalGroupContactsByCompanies=false;
 //   label => the value of this option is a string used as column header
 //     You can use the following localized variables in the label string:
 //     - {Name}
+//     - {DisplayName}
 //     - {FirstName}
 //     - {LastName}
 //     - {MiddleName}
@@ -1174,6 +1174,7 @@ var globalGroupContactsByCompanies=false;
 //     for company or user contacts (you can have different values in the same
 //     column for personal and company contacts).
 //     You can use the following simple variables in the format string:
+//     - {DisplayName}
 //     - {FirstName}
 //     - {LastName}
 //     - {MiddleName}
@@ -1346,7 +1347,7 @@ var globalGroupContactsByCompanies=false;
 // var globalCollectionDisplay=[
 // 	{
 // 		label: '{Name}',
-// 		value: ['{LastName}', ' {MiddleName}', ' {FirstName}']
+// 		value: ['{DisplayName}']
 // 	},
 // 	{
 // 		label: '{Company} [{Department}]',
@@ -1380,7 +1381,7 @@ var globalGroupContactsByCompanies=false;
 // 	{
 // 		label: '{Name}',
 // 		value: {
-// 			personal: ['{LastName}', ' {MiddleName}', ' {FirstName}'],
+// 			personal: ['{DisplayName}'],
 // 			company: ['{Company}', ' [{Department}]']
 // 		}
 // 	},
diff --git a/data_process.js b/data_process.js
index d52f7dc..9b680bc 100644
--- a/data_process.js
+++ b/data_process.js
@@ -4340,75 +4340,90 @@ function dataToVcard(accountUID, inputUID, inputFilterUID, inputEtag)
 	process_elem=process_elem.replace('##:::##suffix##:::##',vcardEscapeValue(tmpvCardEditorRef.find('[data-type="suffix"]').val()));
 	vCardText+=process_elem;
 
+	fn_value=vcardEscapeValue(tmpvCardEditorRef.find('[data-type="display"]').val());
+
+	if(fn_value=='')	//empty FN -> extracted from newly created N
+	{
 // FN (extracted from newly created N [previous "process_elem"], required by RFC)
-	// parsed (contentline_parse) = [1]->"group.", [2]->"name", [3]->";param;param", [4]->"value"
-	parsed=('\r\n'+process_elem).match(vCard.pre['contentline_parse']);
-	// parsed_value = [0]->Family, [1]->Given, [2]->Middle, [3]->Prefix, [4]->Suffix
-	parsed_value=vcardSplitValue(parsed[4],';');
+		// parsed (contentline_parse) = [1]->"group.", [2]->"name", [3]->";param;param", [4]->"value"
+		parsed=('\r\n'+process_elem).match(vCard.pre['contentline_parse']);
+		// parsed_value = [0]->Family, [1]->Given, [2]->Middle, [3]->Prefix, [4]->Suffix
+		parsed_value=vcardSplitValue(parsed[4],';');
 
 // XXX toto je blbost, v settingsoch predsa musi byt jednoznacne ci sa uklada format A alebo B
-	/* backward compatibility for stupid users (remove it in future) */
-	if(typeof globalSettings.contactstorefn.value=='string')
-		var tmp=globalSettings.contactstorefn.value.replace(RegExp(',', 'g'),', ').split(',');
-	else	/* new configuration options (arrays) */
-		var tmp=globalSettings.contactstorefn.value.slice();	// copy the configuration array
-
-	var first_found=false;
-	for(var i=0;i<tmp.length;i++)
-	{
-		var tmp_found=false;
-		if(tmp[i].match(RegExp('surname|lastname|last|family','ig'))!=null)
+		/* backward compatibility for stupid users (remove it in future) */
+		if(typeof globalSettings.contactstorefn.value=='string')
+			var tmp=globalSettings.contactstorefn.value.replace(RegExp(',', 'g'),', ').split(',');
+		else	/* new configuration options (arrays) */
+			var tmp=globalSettings.contactstorefn.value.slice();	// copy the configuration array
+
+		var first_found=false;
+		for(var i=0;i<tmp.length;i++)
 		{
-			if(parsed_value[0]=='')
-				tmp[i]='';
-			else
+			var tmp_found=false;
+			if(tmp[i].match(RegExp('display|displayname','ig'))!=null)
 			{
-				tmp[i]=tmp[i].replace(RegExp((!first_found ? '.*' : '')+'(surname|lastname|last|family)','ig'),parsed_value[0]);
-				first_found=true;
+				if(parsed_value[0]=='')
+					tmp[i]='';
+				else
+				{
+					tmp[i]=tmp[i].replace(RegExp((!first_found ? '.*' : '')+'(display|displayname)','ig'),parsed_value[0]);
+					first_found=true;
+				}
 			}
-		}
-		if(tmp[i].match(RegExp('firstname|first|given','ig'))!=null)
-		{
-			if(parsed_value[1]=='')
-				tmp[i]='';
-			else
+			if(tmp[i].match(RegExp('surname|lastname|last|family','ig'))!=null)
 			{
-				tmp[i]=tmp[i].replace(RegExp((!first_found ? '.*' : '')+'(firstname|first|given)','ig'),parsed_value[1]);
-				first_found=true;
+				if(parsed_value[0]=='')
+					tmp[i]='';
+				else
+				{
+					tmp[i]=tmp[i].replace(RegExp((!first_found ? '.*' : '')+'(surname|lastname|last|family)','ig'),parsed_value[0]);
+					first_found=true;
+				}
 			}
-		}
-		if(tmp[i].match(RegExp('middlename|middle','ig'))!=null)
-		{
-			if(parsed_value[2]=='')
-				tmp[i]='';
-			else
+			if(tmp[i].match(RegExp('firstname|first|given','ig'))!=null)
 			{
-				tmp[i]=tmp[i].replace(RegExp((!first_found ? '.*' : '')+'(middlename|middle)','ig'),parsed_value[2]);
-				first_found=true;
+				if(parsed_value[1]=='')
+					tmp[i]='';
+				else
+				{
+					tmp[i]=tmp[i].replace(RegExp((!first_found ? '.*' : '')+'(firstname|first|given)','ig'),parsed_value[1]);
+					first_found=true;
+				}
 			}
-		}
-		if(tmp[i].match(RegExp('prefix','ig'))!=null)
-		{
-			if(parsed_value[3]=='')
-				tmp[i]='';
-			else
+			if(tmp[i].match(RegExp('middlename|middle','ig'))!=null)
 			{
-				tmp[i]=tmp[i].replace(RegExp((!first_found ? '.*' : '')+'prefix','ig'),parsed_value[3]);
-				first_found=true;
+				if(parsed_value[2]=='')
+					tmp[i]='';
+				else
+				{
+					tmp[i]=tmp[i].replace(RegExp((!first_found ? '.*' : '')+'(middlename|middle)','ig'),parsed_value[2]);
+					first_found=true;
+				}
 			}
-		}
-		if(tmp[i].match(RegExp('suffix','ig'))!=null)
-		{
-			if(parsed_value[4]=='')
-				tmp[i]='';
-			else
+			if(tmp[i].match(RegExp('prefix','ig'))!=null)
 			{
-				tmp[i]=tmp[i].replace(RegExp((!first_found ? '.*' : '')+'suffix','ig'),parsed_value[4]);
-				first_found=true;
+				if(parsed_value[3]=='')
+					tmp[i]='';
+				else
+				{
+					tmp[i]=tmp[i].replace(RegExp((!first_found ? '.*' : '')+'prefix','ig'),parsed_value[3]);
+					first_found=true;
+				}
+			}
+			if(tmp[i].match(RegExp('suffix','ig'))!=null)
+			{
+				if(parsed_value[4]=='')
+					tmp[i]='';
+				else
+				{
+					tmp[i]=tmp[i].replace(RegExp((!first_found ? '.*' : '')+'suffix','ig'),parsed_value[4]);
+					first_found=true;
+				}
 			}
 		}
+		fn_value=tmp.join('');
 	}
-	fn_value=tmp.join('');
 
 	if(fn_value=='')	//empty FN -> we use the company name as FN
 		fn_value=vcardEscapeValue(tmpvCardEditorRef.find('[data-type="org"]').val());
@@ -5672,6 +5687,9 @@ function vcardToData(inputContact, inputIsReadonly, inputIsCompany, inputEditorM
 			// parsed (contentline_parse) = [1]->"group.", [2]->"name", [3]->";param;param", [4]->"value"
 			parsed=vcard_element[0].match(vCard.pre['contentline_parse']);
 
+			if(parsed[4]!=undefined && parsed[4]!='')
+				tmpvCardEditorRef.find('[data-type="display"]').val(vcardUnescapeValue(parsed[4]));
+
 			// values not directly supported by the editor (old values are kept intact)
 			vCard.tplM['contentline_FN'][0]=vCard.tplC['contentline_FN'];
 			vCard.tplM['contentline_FN'][0]=vCard.tplM['contentline_FN'][0].replace('##:::##group_wd##:::##', parsed[1]);
diff --git a/index.html b/index.html
index fd516c2..02a327b 100644
--- a/index.html
+++ b/index.html
@@ -1271,6 +1271,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
 										<td colspan="4" data-size="full"><span><select data-type="xfull_type" data-attr-name="_DEST_"></select></span></td>
 									</tr>
 									<tr>
+										<td style="padding-top: 1px;" colspan="4"><input data-type="display" type="text" class="fs" placeholder="DisplayName" value="" /></td>
+									</tr>
+									<tr>
 										<td style="padding-top: 1px;" colspan="2"><input data-type="given" type="text" class="hs" placeholder="FirstName" value="" /></td>
 										<td style="padding-top: 1px;" colspan="2"><input data-type="family" type="text" class="hs" placeholder="LastName" value="" /></td>
 									</tr>
diff --git a/interface.js b/interface.js
index db635e8..1bbc309 100644
--- a/interface.js
+++ b/interface.js
@@ -5357,6 +5357,7 @@ function localizeCardDAV()
 	abContactRef.find('#photoURL').attr('placeholder',localization[globalInterfaceLanguage].pholderUrlVal);
 
 	abContactRef.find('[data-type="photo"]').text(localization[globalInterfaceLanguage].altPhoto);
+	abContactRef.find('[data-type="display"]').attr('placeholder',localization[globalInterfaceLanguage].pholderDisplay);
 	abContactRef.find('[data-type="given"]').attr('placeholder',localization[globalInterfaceLanguage].pholderGiven);
 	abContactRef.find('[data-type="family"]').attr('placeholder',localization[globalInterfaceLanguage].pholderFamily);
 	abContactRef.find('[data-type="middle"]').attr('placeholder',localization[globalInterfaceLanguage].pholderMiddle);
@@ -5539,7 +5540,7 @@ function processEditorElements(inputEditorRef, processingType, inputIsReadonly,
 	tmp_ref.find('input[data-type^="date_"]').prop('disabled', disabled || readonly);
 
 	// family name, given name, and organization name
-	var typeList=['family', 'given', 'middle', 'nickname', 'prefix', 'suffix', 'ph_firstname', 'ph_lastname', 'date_bday', 'tags', 'title', 'department', 'org'];
+	var typeList=['display', 'family', 'given', 'middle', 'nickname', 'prefix', 'suffix', 'ph_firstname', 'ph_lastname', 'date_bday', 'tags', 'title', 'department', 'org'];
 	for(var i=0; i<typeList.length; i++)
 	{
 		var elementRef = tmp_ref.find('[data-type="'+typeList[i]+'"]');
diff --git a/localization.js b/localization.js
index 2dbdd58..34f4220 100644
--- a/localization.js
+++ b/localization.js
@@ -1053,6 +1053,7 @@ localizationSharedCardDAV['cs_CZ']=	/* Jan Mate <jan.mate@xxxxxxxxxx> */
 {
 	txtContacts: 'Kontakty',
 
+	pholderDisplay: 'TODO',
 	pholderGiven: 'Jméno',
 	pholderFamily: 'Příjmení',
 	pholderMiddle: 'Druhé jméno',
@@ -1279,6 +1280,7 @@ localizationSharedCardDAV['da_DK']=	/* thanks Niels Bo Andersen and Michael Rasm
 {
 	txtContacts: 'Kontakter',
 
+	pholderDisplay: 'TODO',
 	pholderGiven: 'Fornavn',
 	pholderFamily: 'Efternavn',
 	pholderMiddle: 'Mellemnavn',
@@ -1506,6 +1508,7 @@ localizationSharedCardDAV['de_DE']=	/* thanks Marten Gajda and Thomas Scheel */
 {
 	txtContacts: 'Kontakte',
 
+	pholderDisplay: 'TODO',
 	pholderGiven: 'Vorname',
 	pholderFamily: 'Nachname',
 	pholderMiddle: 'Weitere Vornamen',
@@ -1733,6 +1736,7 @@ localizationSharedCardDAV['en_US']=	/* Jan Mate <jan.mate@xxxxxxxxxx> */
 {
 	txtContacts: 'Contacts',
 
+	pholderDisplay: 'DisplayName',
 	pholderGiven: 'FirstName',
 	pholderFamily: 'LastName',
 	pholderMiddle: 'MiddleName',
@@ -1959,6 +1963,7 @@ localizationSharedCardDAV['es_ES']=	/* Damian Vila <damianvila@xxxxxxxxx> */
 {
 	txtContacts: 'Contactos',
 
+	pholderDisplay: 'TODO',
 	pholderGiven: 'Nombre',
 	pholderFamily: 'Apellido',
 	pholderMiddle: 'Segundo nombre',
@@ -2185,6 +2190,7 @@ localizationSharedCardDAV['fr_FR']=	/* thanks John Fischer and Jean-Christophe B
 {
 	txtContacts: 'Contacts',
 
+	pholderDisplay: 'Nom affiché',
 	pholderGiven: 'Prénom',
 	pholderFamily: 'Nom',
 	pholderMiddle: 'Second prénom',
@@ -2411,6 +2417,7 @@ localizationSharedCardDAV['hu_HU']=	/* Jan Mate <jan.mate@xxxxxxxxxx> */
 {
 	txtContacts: 'Kapcsolatok',
 
+	pholderDisplay: 'TODO',
 	pholderGiven: 'Utó',
 	pholderFamily: 'Családi',
 	pholderMiddle: 'Középső',
@@ -2637,6 +2644,7 @@ localizationSharedCardDAV['it_IT']=	/* thanks Luca Ferrario */
 {
 	txtContacts: 'Contatti',
 
+	pholderDisplay: 'TODO',
 	pholderGiven: 'Nome',
 	pholderFamily: 'Cognome',
 	pholderMiddle: 'Altro Nome',
@@ -2863,6 +2871,7 @@ localizationSharedCardDAV['ja_JP']=	/* Muimu Nakayama */
 {
 	txtContacts: '連絡先',
 
+	pholderDisplay: 'TODO',
 	pholderGiven: '名',
 	pholderFamily: '姓',
 	pholderMiddle: 'ミドルネーム',
@@ -3089,6 +3098,7 @@ localizationSharedCardDAV['nl_NL']=	/* thanks Johan Vromans */
 {
 	txtContacts: 'Contacten',
 
+	pholderDisplay: 'TODO',
 	pholderGiven: 'Voornaam',
 	pholderFamily: 'Achternaam',
 	pholderMiddle: 'Tussenvoegsel',
@@ -3315,6 +3325,7 @@ localizationSharedCardDAV['sk_SK']=	/* Jan Mate <jan.mate@xxxxxxxxxx> */
 {
 	txtContacts: 'Kontakty',
 
+	pholderDisplay: 'TODO',
 	pholderGiven: 'Meno',
 	pholderFamily: 'Priezvisko',
 	pholderMiddle: 'Stredné meno',
@@ -3541,6 +3552,7 @@ localizationSharedCardDAV['tr_TR']=	/* thanks Selcuk Pultar */
 {
 	txtContacts: 'İrtibatlar',
 
+	pholderDisplay: 'TODO',
 	pholderGiven: 'Adı',
 	pholderFamily: 'Soyadı',
 	pholderMiddle: 'Göbekadı',
@@ -3767,6 +3779,7 @@ localizationSharedCardDAV['ru_RU']=	/* thanks Александр Симонов
 {
 	txtContacts: 'Контакты',
 
+	pholderDisplay: 'TODO',
 	pholderGiven: 'Имя',
 	pholderFamily: 'Фамилия',
 	pholderMiddle: 'Отчество',
@@ -3993,6 +4006,7 @@ localizationSharedCardDAV['uk_UA']=	/* Serge Yakimchuck <yakim@xxxxxxxxxxxx> */
 {
 	txtContacts: 'Контакти',
 
+	pholderDisplay: 'TODO',
 	pholderGiven: 'Ім\'я',
 	pholderFamily: 'Прізвище',
 	pholderMiddle: 'По батькові',
@@ -4219,6 +4233,7 @@ localizationSharedCardDAV['zh_CN']=	/* thanks Fandy */
 {
 	txtContacts: '联系方式',
 
+	pholderDisplay: 'TODO',
 	pholderGiven: '名',
 	pholderFamily: '姓',
 	pholderMiddle: '中间字',
diff --git a/main.js b/main.js
index 23ebfab..4126463 100644
--- a/main.js
+++ b/main.js
@@ -77,8 +77,8 @@ var globalSettings={
 	addressbookselected: {value:  (typeof globalAddressbookSelected!='undefined' && globalAddressbookSelected!=null && globalAddressbookSelected!='') ? globalAddressbookSelected : '', locked:false},
 	collectiondisplay: {value:  (typeof globalCollectionDisplay!='undefined' && globalCollectionDisplay!=null && globalCollectionDisplay!='') ? globalCollectionDisplay : (
 		(typeof globalGroupContactsByCompanies!='undefined' && globalGroupContactsByCompanies) ?
-		[{label: '{Name}', value: {company: ['{Company}', ' [{Department}]'], personal: ['{LastName}', ' {MiddleName}', ' {FirstName}']}}, {label: '{JobTitle}', value: ['{JobTitle}']}, {label: '{Email}', value: ['{Email[:0]}']}, {label: '{Phone} 1', value: ['{Phone[:0]}']}, {label: '{Phone} 2', value: ['{Phone[:1]}']}, {label: '{NoteText}', value: ['{NoteText}']}] :
-		[{label: '{Name}', value: ['{LastName}', ' {MiddleName}', ' {FirstName}']}, {label: '{Company} [{Department}]', value: ['{Company}', ' [{Department}]']}, {label: '{JobTitle}', value: ['{JobTitle}']}, {label: '{Email}', value: ['{Email[:0]}']}, {label: '{Phone} 1', value: ['{Phone[:0]}']}, {label: '{Phone} 2', value: ['{Phone[:1]}']}, {label: '{NoteText}', value: ['{NoteText}']}]
+		[{label: '{Name}', value: {company: ['{Company}', ' [{Department}]'], personal: ['{DisplayName}']}}, {label: '{JobTitle}', value: ['{JobTitle}']}, {label: '{Email}', value: ['{Email[:0]}']}, {label: '{Phone} 1', value: ['{Phone[:0]}']}, {label: '{Phone} 2', value: ['{Phone[:1]}']}, {label: '{NoteText}', value: ['{NoteText}']}] :
+		[{label: '{Name}', value: ['{DisplayName}']}, {label: '{Company} [{Department}]', value: ['{Company}', ' [{Department}]']}, {label: '{JobTitle}', value: ['{JobTitle}']}, {label: '{Email}', value: ['{Email[:0]}']}, {label: '{Phone} 1', value: ['{Phone[:0]}']}, {label: '{Phone} 2', value: ['{Phone[:1]}']}, {label: '{NoteText}', value: ['{NoteText}']}]
 		), locked:false},
 	collectionsort: {value:  (typeof globalCollectionSort!='undefined' && globalCollectionSort!=null && globalCollectionSort!='') ? globalCollectionSort : '', locked:false},
 	defaultaddresscountry: {value:  (typeof globalDefaultAddressCountry!='undefined' && globalDefaultAddressCountry!=null && globalDefaultAddressCountry!='') ? globalDefaultAddressCountry :'us', locked:false},
@@ -148,8 +148,8 @@ function resetSettings()
 		addressbookselected: {value:  (typeof globalAddressbookSelected!='undefined' && globalAddressbookSelected!=null && globalAddressbookSelected!='') ? globalAddressbookSelected : '', locked:false},
 		collectiondisplay: {value:  (typeof globalCollectionDisplay!='undefined' && globalCollectionDisplay!=null && globalCollectionDisplay!='') ? globalCollectionDisplay : (
 			(typeof globalGroupContactsByCompanies!='undefined' && globalGroupContactsByCompanies) ?
-			[{label: '{Name}', value: {company: ['{Company}', ' [{Department}]'], personal: ['{LastName}', ' {MiddleName}', ' {FirstName}']}}, {label: '{JobTitle}', value: ['{JobTitle}']}, {label: '{Email}', value: ['{Email[:0]}']}, {label: '{Phone} 1', value: ['{Phone[:0]}']}, {label: '{Phone} 2', value: ['{Phone[:1]}']}, {label: '{NoteText}', value: ['{NoteText}']}] :
-			[{label: '{Name}', value: ['{LastName}', ' {MiddleName}', ' {FirstName}']}, {label: '{Company} [{Department}]', value: ['{Company}', ' [{Department}]']}, {label: '{JobTitle}', value: ['{JobTitle}']}, {label: '{Email}', value: ['{Email[:0]}']}, {label: '{Phone} 1', value: ['{Phone[:0]}']}, {label: '{Phone} 2', value: ['{Phone[:1]}']}, {label: '{NoteText}', value: ['{NoteText}']}]
+			[{label: '{Name}', value: {company: ['{Company}', ' [{Department}]'], personal: ['{DisplayName}']}}, {label: '{JobTitle}', value: ['{JobTitle}']}, {label: '{Email}', value: ['{Email[:0]}']}, {label: '{Phone} 1', value: ['{Phone[:0]}']}, {label: '{Phone} 2', value: ['{Phone[:1]}']}, {label: '{NoteText}', value: ['{NoteText}']}] :
+			[{label: '{Name}', value: ['{DisplayName}']}, {label: '{Company} [{Department}]', value: ['{Company}', ' [{Department}]']}, {label: '{JobTitle}', value: ['{JobTitle}']}, {label: '{Email}', value: ['{Email[:0]}']}, {label: '{Phone} 1', value: ['{Phone[:0]}']}, {label: '{Phone} 2', value: ['{Phone[:1]}']}, {label: '{NoteText}', value: ['{NoteText}']}]
 		), locked:false},
 		collectionsort: {value:  (typeof globalCollectionSort!='undefined' && globalCollectionSort!=null && globalCollectionSort!='') ? globalCollectionSort : '', locked:false},
 		defaultaddresscountry: {value:  (typeof globalDefaultAddressCountry!='undefined' && globalDefaultAddressCountry!=null && globalDefaultAddressCountry!='') ? globalDefaultAddressCountry :'us', locked:false},
@@ -1332,8 +1332,8 @@ function transformSettings(settings) {
 			case 3:
 				settings.collectiondisplay=(typeof globalCollectionDisplay!='undefined' && globalCollectionDisplay!=null && globalCollectionDisplay!='') ? globalCollectionDisplay : (
 					(typeof globalGroupContactsByCompanies!='undefined' && globalGroupContactsByCompanies) ?
-					[{label: '{Name}', value: {company: ['{Company}', ' [{Department}]'], personal: ['{LastName}', ' {MiddleName}', ' {FirstName}']}}, {label: '{JobTitle}', value: ['{JobTitle}']}, {label: '{Email}', value: ['{Email[:0]}']}, {label: '{Phone} 1', value: ['{Phone[:0]}']}, {label: '{Phone} 2', value: ['{Phone[:1]}']}, {label: '{NoteText}', value: ['{NoteText}']}] :
-					[{label: '{Name}', value: ['{LastName}', ' {MiddleName}', ' {FirstName}']}, {label: '{Company} [{Department}]', value: ['{Company}', ' [{Department}]']}, {label: '{JobTitle}', value: ['{JobTitle}']}, {label: '{Email}', value: ['{Email[:0]}']}, {label: '{Phone} 1', value: ['{Phone[:0]}']}, {label: '{Phone} 2', value: ['{Phone[:1]}']}, {label: '{NoteText}', value: ['{NoteText}']}]
+					[{label: '{Name}', value: {company: ['{Company}', ' [{Department}]'], personal: ['{DisplayName}']}}, {label: '{JobTitle}', value: ['{JobTitle}']}, {label: '{Email}', value: ['{Email[:0]}']}, {label: '{Phone} 1', value: ['{Phone[:0]}']}, {label: '{Phone} 2', value: ['{Phone[:1]}']}, {label: '{NoteText}', value: ['{NoteText}']}] :
+					[{label: '{Name}', value: ['{DisplayName}']}, {label: '{Company} [{Department}]', value: ['{Company}', ' [{Department}]']}, {label: '{JobTitle}', value: ['{JobTitle}']}, {label: '{Email}', value: ['{Email[:0]}']}, {label: '{Phone} 1', value: ['{Phone[:0]}']}, {label: '{Phone} 2', value: ['{Phone[:1]}']}, {label: '{NoteText}', value: ['{NoteText}']}]
 				);
 
 				settings.collectionsort=(typeof globalCollectionSort!='undefined' && globalCollectionSort!=null && globalCollectionSort!='') ? globalCollectionSort : '';
@@ -1991,6 +1991,10 @@ var globalContactDataColumnDefs = {
 		'property': 'department',
 		'minWidth': 90
 	},
+	'DISPLAYNAME': {
+		'property': 'displayname',
+		'minWidth': 135
+	},
 	'LASTNAME': {
 		'property': 'lastname',
 		'minWidth': 90
@@ -2097,6 +2101,7 @@ var globalContactDataColumnDefs = {
 globalContactDataColumnLabelVars = {
 	'Name': 'txtName',
 
+	'DisplayName': 'pholderDisplay',
 	'FirstName': 'pholderGiven',
 	'LastName': 'pholderFamily',
 	'MiddleName': 'pholderMiddle',

Follow-Ups:
Re: [Inf-IT DAVcl] Formatted NameJán Máté <jan.mate@xxxxxxxxxx>