falkaholic Posted June 19, 2005 Posted June 19, 2005 Hi guys, (I haven't been around much lately, my job as a FileMaker guy came to an end a while back. Now I only dabble in FM for fun now, instead of dishing out cynical and poorly spelt advise). I'm making this DB that generates a random alpha numeric string. This string is then spoken out using the speak() command. I've got that working great. The idea, is that the user then has to sort the numbers and letters by number and by alphabet position (did tha make sense?). For example: sd4f325 should become dfs2345 or 3abd59si9 should become abdis3599 I can't seem to find a good way to generate the correct answer, short of having a case() position() for letter then hardcoding the numbers. I haven't really mastered all that is new and wonderful in FM7 yet, but i bet this could be done. Any ideas?
LaRetta Posted June 19, 2005 Posted June 19, 2005 Hi Eric, Filter ("abcdefghijklmnopqrstuvwxyz0123456789"; textField) Usually this function is used in reverse (textfield then alphanumeric) as a Filter (smile). But if you reverse it (as above), it becomes a character resequencer (sorts it). You can count backwards or alpha backwards (or mix it up or turn it inside out). If you may have two identical characters or double numbers (or more), just put two of each character together (or apart). I've strung 6 together for picking apart (and rearranging) entire sentences. It is case sensitive so include upper before or after lower if you wish. And it's beauty is that it matches (then internally omits) one instance of each character as it goes so you can really manipulate the strings. Filter(textToFilter;filterText) "Returns from textToFilter only those characters specified in filterText, in the order that they were originally entered in textToFilter." Gotta love vs. 7 ! Filter() and FilterValues() are pattern magicians and I've been having a ball exploring possibilities. LaRetta
falkaholic Posted June 19, 2005 Author Posted June 19, 2005 thanks! That was too easy. It works great. FileMaker 7 is great.
Recommended Posts
This topic is 7099 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now