• Anonymous
  • Login
  • Register
OpenNTF Mail Experience - Feature Request: Show the names in reverse order (lastname, firstname)


I think one of the most wanted features in european companies with Lotus Notes is showing the names in folders an views in a kind like "lastname, firstname". In a company with huge amount of users it makes no sense to sort them by firstname. We solved this problem (without lookup to the adressbokk) by making the simple assumption, that the lastname is the last word of the notes name and perhaps a prefix like "von", "van", "de", "du, ...

Here is the formula (works with Notes 4) we are using in our views for this job:

SentBy := @If(Principal = ""; From; Principal);
Who := @If(DeliveredDate != "" | SendTo = ""; SentBy; @Subset(SendTo; 1));
CN1 := @Trim(@Name([CN]; Who));
CN2 := @Left(@Right(Who;"/DDA:");"/" );
CN := @If(@Contains(Who;"/DDA:");CN2;@Contains(@Right(Who;"@");">") & CN1="";@Trim(Who);CN1);
G := @If(CN = ""; @Trim(@If(DeliveredDate != "" | SendTo = ""; @Name([G]; SentBy); @Name([G]; @Subset(SendTo; 1)))); "");
S := @If(CN = ""; @Trim(@If(DeliveredDate != "" | SendTo = ""; @Name([S]; SentBy); @Name([S]; @Subset(SendTo; 1)))); "");
Person := @If(CN != ""; CN; G != ""; G + " " + S; S != ""; S; @Trim(X400FreeForm));
Person2 := @If(@Left(Person;1)="\"" & @Right(Person;1)="\""; @LeftBack(@RightBack(Person;1);1); Person);
Person3 := @If(Form = "Delivery Report" : "NonDelivery Report" : "Trace Report"; "Mail Router"; Person2);
REM "Some domains already use the reverse order...so prevent them to be resorted...";
ReverseName := @If(@Contains(Who; "@Exchange":"@dummy.com"); "1"; "");

REM "Split up the name into seperate words. Maximum of 6 words per name...";
Wort1:= @Word(Person3; " "; 1) ;
Wort2:= @Word(Person3; " "; 2) ;
Wort3:= @Word(Person3; " "; 3) ;
Wort4:= @Word(Person3; " "; 4) ;
Wort5:= @Word(Person3; " "; 5) ;
Wort6:= @Word(Person3; " "; 6) ;

REM "Test for name prefixes like de, ter mac, von... which belong to the lastname";
PräfixListe := "de":"del":"di":"du":"la":"le":"mc":"mac":"ter":"van":"von":"zur";
Präfix1 := @If(@LowerCase(Wort1) *= PräfixListe; "1"; "" );
Präfix2 := @If(@LowerCase(Wort2) *= PräfixListe; "1"; "" );
Präfix3 := @If(@LowerCase(Wort3) *= PräfixListe; "1"; "" );
Präfix4 := @If(@LowerCase(Wort4) *= PräfixListe; "1"; "" );
Präfix5 := @If(@LowerCase(Wort5) *= PräfixListe; "1"; "" );

REM "Take the number of words and the prefixes and build the reverse name like prefix + blank + last word + comma + blank + all other words from the beginning";
@If(Person3 = "Mail Router"; Person3; ReverseName = "1" & Präfix1 = "1"; @Trim(Wort1 + " " + Wort2 + ", " + Wort3 + " " + Wort4 + " " + Wort5 + " " + Wort6); ReverseName = "1" & Präfix1 = ""; @Trim(Wort1 + ", " + Wort2 + " " + Wort3 + " " + Wort4 + " " + Wort5 + " " + Wort6); Wort6 != "" & Präfix5 != ""; Wort5 + " " + Wort6 + ", " + Wort1 + " " + Wort2 + " " + Wort3 + " " + Wort4; Wort6 != ""; Wort6 + ", " + Wort1 + " " + Wort2 + " " + Wort3 + " " + Wort4 + " " + Wort5; Wort5 != "" & Präfix4 != ""; Wort4 + " " + Wort5 + ", " + Wort1 + " " + Wort2 + " " + Wort3; Wort5 != ""; Wort5 + ", " + Wort1 + " " + Wort2 + " " + Wort3 + " " + Wort4; Wort4 != "" & Präfix3 != ""; Wort3 + " " + Wort4 + ", " + Wort1 + " " + Wort2; Wort4 != ""; Wort4 + ", " + Wort1 + " " + Wort2 + " " + Wort3; Wort3 != "" & Präfix2 != ""; Wort2 + " " + Wort3 + ", " + Wort1; Wort3 != ""; Wort3 + ", " + Wort1 + " " + Wort2; Wort2 != ""; Wort2 + ", " + Wort1; Person3)

We are using this forula since 2 years and I think it works for internal mail in 99% of our more than 20.000 users. Perhaps someone is interested to implement this in OpenNTF Mail Experience?

Regards, Harald



Taken Actions by Owners

Owners have rejected the request.



In this field you can enter the actual request.

You can use the rich text editor for rich text formating. You can also enter HTML to embed objects, e.g. to embed a YouTube video or a screenshot of the project. In this case use '[' and ']' to mark the passthrough HTML as such.

Please note that the first time you use the new UI your description is converted from rich text to MIME. You might want to copy and paste the raw plain text from the old UI in the new UI so that you don't loose information.
In this field owners can describe what they have done or want to do.

You can use the rich text editor for rich text formating. You can also enter HTML to embed objects, e.g. to embed a YouTube video or a screenshot of the project. In this case use '[' and ']' to mark the passthrough HTML as such.

Please note that the first time you use the new UI your description is converted from rich text to MIME. You might want to copy and paste the raw plain text from the old UI in the new UI so that you don't loose information.