YOUSEFUL / FILEMAKER
Youseful Text: FAQ, examples and tutorial
Learning center · Function reference
Use YsflText.fmx64 to normalize text, manipulate value lists, work with regular
expressions, encode text and inspect XML. No extra runtime is required.
FAQ
What separates list entries? FileMaker paragraphs (¶). Functions also accept
line-feed and CRLF input and return FileMaker-style lists.
Is matching case-sensitive? Usually yes. Functions that document the i
option compare without case. LinesUnique preserves the first spelling encountered.
Does RegexMatch validate the whole value? It finds a match anywhere. Add ^
and $ to require a complete match. FileMaker string literals need doubled
backslashes for regex escapes such as \\d.
Does IsEmail guarantee delivery? No. It checks a plausible address format; it does not connect to a mail server or verify that a mailbox exists.
Examples
Collapse whitespace:
YsflTx_Collapse ( " Youseful Software " )Result: Youseful Software.
Keep the first occurrence regardless of case:
YsflTx_LinesUnique ( "Alice¶bob¶ALICE" ; "i" )Result: Alice¶bob.
Tutorial
Standalone sample scripts: Clean names.
Goal: turn a pasted list into a clean, unique, sorted contact-name list.
- Create a script named
Youseful - Clean names. - Add the following steps. Each stage captures its error before the next stage.
Set Variable [ $raw ; Value: " bob ¶Alice¶BOB¶" ]
Set Variable [ $trimmed ; Value: YsflTx_LinesTrim ( $raw ; "empty" ) ]
Set Variable [ $error ; Value: YsflTx_LastError ]
If [ $error <> 0 ]
Exit Script [ Text Result: $trimmed ]
End If
Set Variable [ $unique ; Value: YsflTx_LinesUnique ( $trimmed ; "i" ) ]
Set Variable [ $error ; Value: YsflTx_LastError ]
If [ $error <> 0 ]
Exit Script [ Text Result: $unique ]
End If
Set Variable [ $sorted ; Value: YsflTx_LinesSort ( $unique ; "i" ) ]
Set Variable [ $error ; Value: YsflTx_LastError ]
If [ $error <> 0 ]
Exit Script [ Text Result: $sorted ]
End If
Show Custom Dialog [ "Clean names" ; $sorted ]- Run it. Expected output:
Alice
bob- Replace
$rawwith a text field from your own file when ready. This script only reads that source; use Set Field explicitly if you want to save the result.
Troubleshooting
Empty lines remain unless empty is supplied to LinesTrim. Case-insensitive
comparison does not change the spelling of the retained line. For invalid regex
patterns, capture LastErrorText immediately to see the parser's message.