8 Replies Latest reply on Jul 18, 2011 2:07 PM by rsingleton

Case function calculation conundrum

Title

Case function calculation conundrum

Post

I've been using this calculation for awhile and recently (I may have changed something inadvertently) the group part won't work...i can't figure out what i'm doing wrong. can someone help? I want it to return the group fee but it doesn't. All other parts of the calculation work.

Case ( session type="cancel" ; 0 + balance forward ;  session type= "payment only" ; 0 + balance forward ; session type = "INTAKE"; 0  + balance forward; modality this session = "group"; group fee +  balance forward;  modality this session = "evaluation"; If( clinical database 2010 case no::Intake date <= Date( 3 ; 5 ; 2007 ) ; 60 + balance forward ; 120 + balance forward); modality this session = "med mgmt"; 0  + balance forward; modality this session = "intake"; 0 + balance forward; actual fee + balance forward )

ps i am self taught at a small non-profit counseling agency (i'm really a therapist ) so forgive me if my question or ignorance is a pain in the neck!

• 1. Re: Case function calculation conundrum

If modalty this session = "group", what value is returned?

The main thing that I noticed is that your case statement checks Session Type for specific values before it checks modality this session. If sesssion Type is "cancel", "payment only" or "intake", you won't get a group fee returned.

• 2. Re: Case function calculation conundrum

Thanks, PhilModJunk.

if modality this session = "group", the value returned should be "group fee" a separate field defined by a number. Right now, "actual fee" is returned and it should be "group fee".

yes, if session type is cancel or payment only or intake, i don't want a group fee returned. the result should be 0....and that is working.

• 3. Re: Case function calculation conundrum

Thanks, that tells me that none of your boolean expressions are producing true when you've specified a group session.

What kind of field is Modality this Session and how is it formatted on your layout? Is this, perhaps, a field with a checkbox group?

• 4. Re: Case function calculation conundrum

Modality this session is a dropdown value list.

• 5. Re: Case function calculation conundrum

And this is a text field (Check in Manage | Database | Fields)and mutliple values may not be selected from this list?

The text entered when Group is selected is "group" with no added characters such as a space or a return in this field? You may want to place an unformatted copy of this field next to the drop down temporarily so that you can doubleclick the text in this field and see if there are any other characters in this field in addition to "group".

• 6. Re: Case function calculation conundrum

Problem solved!! Thank you so much! I thought i tried that but I guess not.

I really appreciate the help! There were spaces or something in there.

• 7. Re: Case function calculation conundrum

You may want to add a field validation option that limits values in this field to only values that are a member of your drop down's value list. This can keep users from accidentally editing data in this field into something that doesn't match.

• 8. Re: Case function calculation conundrum

good idea; i will!!!!!!!