FileMaker Tip 271

Weg met dat nest!

 

Voor gebruikers van FileMaker 7 en hoger is er goed nieuws: het vervelend nesten van bijvoorbeeld een complexe Substitute-functie is niet langer nodig.

Als we even terugkijken naar Tip 196, dan kunnen we die nu veel duidelijker neerschrijven omdat we elke substitutie apart mogen zetten tussen vierkante haken.

Dit was de oude werkwijze:

Substitute(Substitute(Substitute(Substitute(Substitute
(Substitute(Substitute(Substitute(Substitute(Substitute
(Substitute(Substitute(Substitute(Substitute(Substitute
(Substitute(Substitute(Substitute(Substitute(Substitute
(Substitute(Substitute(Substitute(Substitute(Substitute
(Substitute(Substitute(Substitute(Substitute(Substitute
(Substitute(Substitute(Substitute(Substitute(Substitute
(Substitute(Substitute(Substitute(Substitute(Substitute
(Substitute(Substitute(Substitute(Substitute(Substitute
(Substitute(Substitute(Substitute(Substitute(Substitute
(Substitute(Substitute(Substitute(Substitute(Substitute
(Substitute(Substitute(Substitute(Substitute(Substitute
(UwEigenTekstveld;"Á";"A");"á";"a");"À";"A");"à";"a");
"Â";"A");"â"; "a");"Ä";"A");"ä";"a");"Ã";"A");"ã";"a");
"Å";"A");"å";"a");"Æ";"Ae");"æ";"ae"); "Ç";"C");"ç";"c");
"Ð";"D");"ð";"o");"É";"E");"é";"e");"È";"E");"è";"e");
"Ê";"E"); "ê";"e");"Ë";"E");"ë";"e");"Í";"I");"í";"i");
"Ì";"I");"ì";"i");"Î";"I");"î";"i"); "Ï";"I");"ï";"i")
;"Ñ";"N");"ñ";"n");"Ó";"O");"ó";"o");"Ò";"O");"ò";"o");
"Ô";"O"); "ô";"o");"Ö";"O");"ö";"o");"Õ";"O");"õ";"o");
"Ø";"O");"ø";"o");"ß";"ss");"Ú";"U"); "ú";"u");"Ù";"U");
"ù";"u");"Û";"U");"û";"u");"Ü";"U");"ü";"u");"Ý";"Y");
"ý";"y"); "ÿ";"y")

En dat wordt nu (we beperken ons tot een deel van de gevallen voor de letter A):

Substitute(UwEigenTekstveld;["Á";"a"];["á";"a"];
["À";"a"];["à";"a"];["Â";"a"];["â";"a"];["Ä";"a"];
["A";"a"];["ä";"a"];["Ã";"a"];["ã";"a"])

Heel wat eenvoudiger dus!

 

Terug naar het selectiemenu voor de tips.