David Jondreau Posted November 13, 2008 Posted November 13, 2008 I feel like I've seen this on here recently, but can't find it. Can anyone provide a way to filter out null values from a list of values? "¶¶ABC¶123¶123¶¶¶EFG¶" should return "ABC¶123¶123¶EFG" Thanks
comment Posted November 13, 2008 Posted November 13, 2008 This is my preferred method: Substitute ( TrimAll ( Substitute ( listOfValues ; [ " " ; "§" ] ; [ ¶ ; " " ] ) ; 0 ; 0 ) ; [ " " ; ¶] ; [ "§" ; " " ] )
LaRetta Posted November 13, 2008 Posted November 13, 2008 (edited) One possible way: Substitute ( TrimAll ( Substitute ( text ; ¶ ; " " ) ; 0 ; 0 ) ; " " ; ¶ ) UPDATE: Actually, the concept came from Comment's mind but the calc is my twist on it ... his was, of course, shorter and sweeter. But the idea is to change the carriage returns (or any character wanted) into spaces. Then remove the extra spaces. Then turn it back into carriage returns. Edited November 13, 2008 by Guest Added update
alterbentzion Posted December 23, 2008 Posted December 23, 2008 Maybe this is a stupid question, Comment, but I noticed in your sample code that you used three open parentheses and only one close. Why is that? When do close parentheses matter, and when don't they? (Before posting this, I looked in two FMP books and quickly searched FMForums, but at first glance I didn't find an answer.) Thanks!
comment Posted December 23, 2008 Posted December 23, 2008 No, there are three functions used, and three open/close pairs of parentheses.
alterbentzion Posted December 23, 2008 Posted December 23, 2008 : Dude! My new eyeglasses are doing more harm than good. One other, possibly stupid Q, if you don't mind - how did you get your code to display in color like that - is that a post-FMP7 feature? Thanks again.
comment Posted December 23, 2008 Posted December 23, 2008 It's a forum feature - I have no control over it.
Recommended Posts
This topic is 5867 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