View Single Post
Old 12-12-2014, 02:01 PM   #624
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by matanic View Post
This works (other than one missing closed parenthesis, but that was easy to fix)!
Huh, how about that. (Fixed for posterity.)

Quote:
My #readingstatus column is not Yes/No but I created another custom column from the #readingstatus column that was Yes/No and it works great! Thanks for the quick reply!

Just out of curiosity, how would you use the and/not or something similar with a function that is testing against a pattern instead of just looking for empy/not empty? I had actually tried using GPM instead of TPM, but I couldn't get any type of and/not or and/or to work with the contains function.
As chaley said.

Contains can be used to return "1" or the null value "" depending on the match, and the and() and not() functions are booleans that check for non-empty strings.

So, we can cut down on the number of custom columns by using:

Code:
program:

test(
    and(
        field('#new'),
            contains(field('#readingstatus'), '100%_I_am_done_yay', '', '1-New')
    ),
    '1-New',
    ''
)
Or whatever is in your #readingstatus column.

Last edited by eschwartz; 12-13-2014 at 09:45 PM. Reason: chaley's correction
eschwartz is offline   Reply With Quote