daddioja Posted October 4, 2006 Posted October 4, 2006 This should be easy for someone. I have a checkbox field with 9 options run off a custom value list. I am running a report of how many times each option is checked throughout the entire db. There might be an easier way, but here is what I have. I have a calculation field for each option of the check box field. So I have 9 calculation fields. Each field will calculate a "1" if the option is checked. For example: If(T_strategies= "Presentation";"1";"") The problem is that if I have more than 1 tiem checked, the value of T_strategies is something else like: "Email Presentation" instead of just Presentation. How do I tell the calculation that if T-strategies has the word Presentation anywhere in it put a "1" in the field? Is there a wild card I can add to the formula so the calculation is If(T_strategies= [color:red]any other text & "Presentation" [color:red]& any other text;"1";"") ? That is what I think would work but don't know how to do it. Thanks for any help you can provide.
Søren Dyhr Posted October 4, 2006 Posted October 4, 2006 Here's an idea! http://www.kevinfrank.com/download/counting-values.zip --sd
daddioja Posted October 4, 2006 Author Posted October 4, 2006 Thanks, I appreciate the help. Since I have a few of these situations in the database, I was hoping it would be a simple syntax solution with the existing formula rather than scripts. But this will certainly fit the bill. Many thanks.
BobWeaver Posted October 5, 2006 Posted October 5, 2006 You can use the position() function to find if a particular piece of text appears in a larger piece of text: If(Position(T_strategies; "Presentation" ;1;1);"1";"")
daddioja Posted October 5, 2006 Author Posted October 5, 2006 Brilliant. Just what I was looking for. Thanks to both of you.
Recommended Posts
This topic is 6686 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