Das Notes Forum
Domino 9 und frühere Versionen => Entwicklung => Thema gestartet von: MartinG am 26.11.02 - 15:56:52
-
Hallo,
ich habe in einer Datenbank ein Profildokument wo in einem Textfeld Kategorien eingepflegt werden.
Das ganze funktioniert auch perfekt - nur möchten meine User jetzt gerne das diese Kategorien jetzt auch alphabetisch sortiert werden. Leider komme ich da nicht richtig weiter bzw. befürchte das dies mit Formelsprache nicht mehr machbar ist?
Ich habe mir das so gedacht das ich dort eine Aktion oder Schaltfläche einfüge wo dann auf Knopfdruck dieses Feld sortiert wird...
Vielen Dank schon mal im Vorraus...
Martin G.
-
Hallo,
im Verzeichnis bei den Gruppen kann man die Mitgliede sortieren lassen. Das ist aber über Script gelöst.
Über die Formelsprache ist das nict möglich.
Gruß Christopher
-
Über die Formelsprache ist das nict möglich.
Topic:
Sorting a Text List
Subject:
This formula will sort a text list (without numbers or punctuation). You can adjust the accuracy from 1 to 10 characters. This formula is designed to work in a field. Replace Values with your text list, and change the Accuracy variable to meet your needs. Long lists work faster with lower accuracy numbers.
Syntax:
Accuracy:=10;
X := Accuracy - 1;
List := @Trim(@UpperCase(Values));
List2 := @Trim(@Implode(List + "Ü"; ""));
List3 := @Implode(@Explode(List2; " "); "Ö");
List4 := @Explode(List3; "Ü") + @Repeat("Ö"; X+1);
A := @Middle(List4; X; 1) + "Ü" + List4;
B := @Trim(@Right(A; "ÖÜ") : @Right(A; "AÜ") : @Right(A; "BÜ") : @Right(A; "CÜ") : @Right(A; "DÜ") : @Right(A; "EÜ") : @Right(A; "FÜ") : @Right(A; "GÜ") : @Right(A; "HÜ") : @Right(A; "IÜ") : @Right(A; "JÜ") : @Right(A; "KÜ") : @Right(A; "LÜ") : @Right(A; "MÜ") : @Right(A; "NÜ") : @Right(A; "OÜ") : @Right(A; "PÜ") : @Right(A; "QÜ") : @Right(A; "RÜ") : @Right(A; "SÜ") : @Right(A; "TÜ") : @Right(A; "UÜ") : @Right(A; "VÜ") : @Right(A; "WÜ") : @Right(A; "XÜ") : @Right(A; "YÜ") : @Right(A; "ZÜ"));
@If(X > 0; @Set("X"; X - 1); @Return(@Replace(@Trim(@Explode(@Implode(@Explode(@Trim(@Implode(B + "Ü"; "")); "Ö"); " "); "Ü")); List; Values)));
@Set("A"; @Middle(B; X; 1) + "Ü" + B);
@Set("B"; @Trim(@Right(A; "ÖÜ") : @Right(A; "AÜ") : @Right(A; "BÜ") : @Right(A; "CÜ") : @Right(A; "DÜ") : @Right(A; "EÜ") : @Right(A; "FÜ") : @Right(A; "GÜ") : @Right(A; "HÜ") : @Right(A; "IÜ") : @Right(A; "JÜ") : @Right(A; "KÜ") : @Right(A; "LÜ") : @Right(A; "MÜ") : @Right(A; "NÜ") : @Right(A; "OÜ") : @Right(A; "PÜ") : @Right(A; "QÜ") : @Right(A; "RÜ") : @Right(A; "SÜ") : @Right(A; "TÜ") : @Right(A; "UÜ") : @Right(A; "VÜ") : @Right(A; "WÜ") : @Right(A; "XÜ") : @Right(A; "YÜ") : @Right(A; "ZÜ")));
@If(X > 0; @Set("X"; X - 1); @Return(@Replace(@Trim(@Explode(@Implode(@Explode(@Trim(@Implode(B + "Ü"; "")); "Ö"); " "); "Ü")); List; Values)));
@Set("A"; @Middle(B; X; 1) + "Ü" + B);
@Set("B"; @Trim(@Right(A; "ÖÜ") : @Right(A; "AÜ") : @Right(A; "BÜ") : @Right(A; "CÜ") : @Right(A; "DÜ") : @Right(A; "EÜ") : @Right(A; "FÜ") : @Right(A; "GÜ") : @Right(A; "HÜ") : @Right(A; "IÜ") : @Right(A; "JÜ") : @Right(A; "KÜ") : @Right(A; "LÜ") : @Right(A; "MÜ") : @Right(A; "NÜ") : @Right(A; "OÜ") : @Right(A; "PÜ") : @Right(A; "QÜ") : @Right(A; "RÜ") : @Right(A; "SÜ") : @Right(A; "TÜ") : @Right(A; "UÜ") : @Right(A; "VÜ") : @Right(A; "WÜ") : @Right(A; "XÜ") : @Right(A; "YÜ") : @Right(A; "ZÜ")));
@If(X > 0; @Set("X"; X - 1); @Return(@Replace(@Trim(@Explode(@Implode(@Explode(@Trim(@Implode(B + "Ü"; "")); "Ö"); " "); "Ü")); List; Values)));
@Set("A"; @Middle(B; X; 1) + "Ü" + B);
@Set("B"; @Trim(@Right(A; "ÖÜ") : @Right(A; "AÜ") : @Right(A; "BÜ") : @Right(A; "CÜ") : @Right(A; "DÜ") : @Right(A; "EÜ") : @Right(A; "FÜ") : @Right(A; "GÜ") : @Right(A; "HÜ") : @Right(A; "IÜ") : @Right(A; "JÜ") : @Right(A; "KÜ") : @Right(A; "LÜ") : @Right(A; "MÜ") : @Right(A; "NÜ") : @Right(A; "OÜ") : @Right(A; "PÜ") : @Right(A; "QÜ") : @Right(A; "RÜ") : @Right(A; "SÜ") : @Right(A; "TÜ") : @Right(A; "UÜ") : @Right(A; "VÜ") : @Right(A; "WÜ") : @Right(A; "XÜ") : @Right(A; "YÜ") : @Right(A; "ZÜ")));
@If(X > 0; @Set("X"; X - 1); @Return(@Replace(@Trim(@Explode(@Implode(@Explode(@Trim(@Implode(B + "Ü"; "")); "Ö"); " "); "Ü")); List; Values)));
@Set("A"; @Middle(B; X; 1) + "Ü" + B);
@Set("B"; @Trim(@Right(A; "ÖÜ") : @Right(A; "AÜ") : @Right(A; "BÜ") : @Right(A; "CÜ") : @Right(A; "DÜ") : @Right(A; "EÜ") : @Right(A; "FÜ") : @Right(A; "GÜ") : @Right(A; "HÜ") : @Right(A; "IÜ") : @Right(A; "JÜ") : @Right(A; "KÜ") : @Right(A; "LÜ") : @Right(A; "MÜ") : @Right(A; "NÜ") : @Right(A; "OÜ") : @Right(A; "PÜ") : @Right(A; "QÜ") : @Right(A; "RÜ") : @Right(A; "SÜ") : @Right(A; "TÜ") : @Right(A; "UÜ") : @Right(A; "VÜ") : @Right(A; "WÜ") : @Right(A; "XÜ") : @Right(A; "YÜ") : @Right(A; "ZÜ")));
@If(X > 0; @Set("X"; X - 1); @Return(@Replace(@Trim(@Explode(@Implode(@Explode(@Trim(@Implode(B + "Ü"; "")); "Ö"); " "); "Ü")); List; Values)));
@Set("A"; @Middle(B; X; 1) + "Ü" + B);
@Set("B"; @Trim(@Right(A; "ÖÜ") : @Right(A; "AÜ") : @Right(A; "BÜ") : @Right(A; "CÜ") : @Right(A; "DÜ") : @Right(A; "EÜ") : @Right(A; "FÜ") : @Right(A; "GÜ") : @Right(A; "HÜ") : @Right(A; "IÜ") : @Right(A; "JÜ") : @Right(A; "KÜ") : @Right(A; "LÜ") : @Right(A; "MÜ") : @Right(A; "NÜ") : @Right(A; "OÜ") : @Right(A; "PÜ") : @Right(A; "QÜ") : @Right(A; "RÜ") : @Right(A; "SÜ") : @Right(A; "TÜ") : @Right(A; "UÜ") : @Right(A; "VÜ") : @Right(A; "WÜ") : @Right(A; "XÜ") : @Right(A; "YÜ") : @Right(A; "ZÜ")));
@If(X > 0; @Set("X"; X - 1); @Return(@Replace(@Trim(@Explode(@Implode(@Explode(@Trim(@Implode(B + "Ü"; "")); "Ö"); " "); "Ü")); List; Values)));
@Set("A"; @Middle(B; X; 1) + "Ü" + B);
@Set("B"; @Trim(@Right(A; "ÖÜ") : @Right(A; "AÜ") : @Right(A; "BÜ") : @Right(A; "CÜ") : @Right(A; "DÜ") : @Right(A; "EÜ") : @Right(A; "FÜ") : @Right(A; "GÜ") : @Right(A; "HÜ") : @Right(A; "IÜ") : @Right(A; "JÜ") : @Right(A; "KÜ") : @Right(A; "LÜ") : @Right(A; "MÜ") : @Right(A; "NÜ") : @Right(A; "OÜ") : @Right(A; "PÜ") : @Right(A; "QÜ") : @Right(A; "RÜ") : @Right(A; "SÜ") : @Right(A; "TÜ") : @Right(A; "UÜ") : @Right(A; "VÜ") : @Right(A; "WÜ") : @Right(A; "XÜ") : @Right(A; "YÜ") : @Right(A; "ZÜ")));
@If(X > 0; @Set("X"; X - 1); @Return(@Replace(@Trim(@Explode(@Implode(@Explode(@Trim(@Implode(B + "Ü"; "")); "Ö"); " "); "Ü")); List; Values)));
@Set("A"; @Middle(B; X; 1) + "Ü" + B);
@Set("B"; @Trim(@Right(A; "ÖÜ") : @Right(A; "AÜ") : @Right(A; "BÜ") : @Right(A; "CÜ") : @Right(A; "DÜ") : @Right(A; "EÜ") : @Right(A; "FÜ") : @Right(A; "GÜ") : @Right(A; "HÜ") : @Right(A; "IÜ") : @Right(A; "JÜ") : @Right(A; "KÜ") : @Right(A; "LÜ") : @Right(A; "MÜ") : @Right(A; "NÜ") : @Right(A; "OÜ") : @Right(A; "PÜ") : @Right(A; "QÜ") : @Right(A; "RÜ") : @Right(A; "SÜ") : @Right(A; "TÜ") : @Right(A; "UÜ") : @Right(A; "VÜ") : @Right(A; "WÜ") : @Right(A; "XÜ") : @Right(A; "YÜ") : @Right(A; "ZÜ")));
@If(X > 0; @Set("X"; X - 1); @Return(@Replace(@Trim(@Explode(@Implode(@Explode(@Trim(@Implode(B + "Ü"; "")); "Ö"); " "); "Ü")); List; Values)));
@Set("A"; @Middle(B; X; 1) + "Ü" + B);
@Set("B"; @Trim(@Right(A; "ÖÜ") : @Right(A; "AÜ") : @Right(A; "BÜ") : @Right(A; "CÜ") : @Right(A; "DÜ") : @Right(A; "EÜ") : @Right(A; "FÜ") : @Right(A; "GÜ") : @Right(A; "HÜ") : @Right(A; "IÜ") : @Right(A; "JÜ") : @Right(A; "KÜ") : @Right(A; "LÜ") : @Right(A; "MÜ") : @Right(A; "NÜ") : @Right(A; "OÜ") : @Right(A; "PÜ") : @Right(A; "QÜ") : @Right(A; "RÜ") : @Right(A; "SÜ") : @Right(A; "TÜ") : @Right(A; "UÜ") : @Right(A; "VÜ") : @Right(A; "WÜ") : @Right(A; "XÜ") : @Right(A; "YÜ") : @Right(A; "ZÜ")));
@If(X > 0; @Set("X"; X - 1); @Return(@Replace(@Trim(@Explode(@Implode(@Explode(@Trim(@Implode(B + "Ü"; "")); "Ö"); " "); "Ü")); List; Values)));
@Set("A"; @Middle(B; X; 1) + "Ü" + B);
@Set("B"; @Trim(@Right(A; "ÖÜ") : @Right(A; "AÜ") : @Right(A; "BÜ") : @Right(A; "CÜ") : @Right(A; "DÜ") : @Right(A; "EÜ") : @Right(A; "FÜ") : @Right(A; "GÜ") : @Right(A; "HÜ") : @Right(A; "IÜ") : @Right(A; "JÜ") : @Right(A; "KÜ") : @Right(A; "LÜ") : @Right(A; "MÜ") : @Right(A; "NÜ") : @Right(A; "OÜ") : @Right(A; "PÜ") : @Right(A; "QÜ") : @Right(A; "RÜ") : @Right(A; "SÜ") : @Right(A; "TÜ") : @Right(A; "UÜ") : @Right(A; "VÜ") : @Right(A; "WÜ") : @Right(A; "XÜ") : @Right(A; "YÜ") : @Right(A; "ZÜ")));
@Replace(@Trim(@Explode(@Implode(@Explode(@Trim(@Implode(B + "Ü"; "")); "Ö"); " "); "Ü")); List; Values)
... sagt jedenfalls meine KnowledgeBase ;D ;D ;D
-
alder, was geht da ab...KRASSSSSSSSSSSSSSSSSSSSS
*nö oder?* 8) 8) 8) 8) 8) 8) 8) 8)
aber hey *scanned fachmännisch die 2 Mio Codezeilen und entdeckt in 0.3 ns den Fehler*, das eine Ü ist falsch, das müßte 3 nach oben 2 nach rechts....ok Spaß bei Seite...
man sollte diese Formel "Rubicks Cube" nennen, angesichts der verdrehten Komplexität
-
O.K. ich nehme alles zurück >:( Es ist über die Formelsprache möglich ;D
-
Danke für die Hammerformel... - leider ist mir nicht ganz klar wo ich die Formel jetzt einbauen muss?
Anstelle von "List" muss ich vermutlich meinen Feldnamen verwenden?
-
Danke für die Hammerformel... - leider ist mir nicht ganz klar wo ich die Formel jetzt einbauen muss?
Anstelle von "List" muss ich vermutlich meinen Feldnamen verwenden?
Ich hab's befürchtet....
Ja meinst Du denn ernsthaft, ich hätte sowas schonmal verwendet?
Ich warte immer noch auf den, der sich die Mühe macht, das zu verstehen <vbg>
-
@wflamme
die Formel gibt's glaube ich bei IRIS - na gut wer die verwendet ist selber schuld 8)
- ich möchte nicht wissen wie lange das dauert bis die ganzen implodes, explodes zur Ausführung brauchen, Zeichen für Zeichen und das nur für 10 Werte.
na ja manche mögens halt Formelmäßig...
-
@wflamme
die Formel gibt's glaube ich bei IRIS - na gut wer die verwendet ist selber schuld 8)
- ich möchte nicht wissen wie lange das dauert bis die ganzen implodes, explodes zur Ausführung brauchen, Zeichen für Zeichen und das nur für 10 Werte.
na ja manche mögens halt Formelmäßig...
Quelle war wohl:
http://www.google.de/search?hl=de&ie=UTF-8&oe=UTF-8&q=%22This+formula+will+sort+a+text+list%22&btnG=Google-Suche&meta= (http://www.google.de/search?hl=de&ie=UTF-8&oe=UTF-8&q=%22This+formula+will+sort+a+text+list%22&btnG=Google-Suche&meta=)
Bzgl. Performance bin ich nicht sicher, Formelsprache ist LS da haushoch überlegen..
Ich würd's natürlich auch mit Script lösen..
-
Vielen Dank für Eure Hilfe... - die Formellösung hat bei mir leider nicht funktioniert. Habe inzwischen aber in Eknori's Schatzkiste eine Script Sortierroutine gefunden welche ich zwar nicht ganz verstehe aber trotzdem perfekt funktioniert...
-
... hey die Formel is ja der Hammer...
ata