blevey Posted August 23, 2006 Share Posted August 23, 2006 I have a calc field formatted as currency, however I’d like to have it display “Quote†instead of an actual dollar amount for some cases. Eg, Volume_Price = Case(Qty>= 250; Single_Price*0.8; Qty>=500; Single_Price *0.6;Qty>500;â€Quoteâ€) So when: Qty = 100 Single_Price = $25.00 Volume_Price = $20.00 Any suggestions? Quote Link to comment Share on other sites More sharing options...
comment Posted August 23, 2006 Share Posted August 23, 2006 Well, "Quote" is not a number, so you would need to set the result to Text. But then you would also need to format the result as currency in the calculation itself, which can get pretty complex. You could take the easy way out by returning an empty result when Qty > 500, and use another calculation field = Case ( Qty > 500 ; "Quote" ) to produce the label. BTW, your calculation seems wrong. I don't know your business logic, but there is no result specified for Qty Quote Link to comment Share on other sites More sharing options...
Maarten Witberg Posted August 23, 2006 Share Posted August 23, 2006 I'd like to ask what the reason for this is. What's a quote in this context? kjoe Quote Link to comment Share on other sites More sharing options...
blevey Posted August 23, 2006 Author Share Posted August 23, 2006 BTW, your calculation seems wrong. I don't know your business logic, but there is no result specified for Qty You're right, it should have been Quote Link to comment Share on other sites More sharing options...
LaRetta Posted August 23, 2006 Share Posted August 23, 2006 So as suggested, create a text calculation with: Case( Qty Qty ”Quote” ) ... or produce a separate text calc to hold the Quote word. Quote Link to comment Share on other sites More sharing options...
Robert Schaub Posted August 23, 2006 Share Posted August 23, 2006 Would this work? Case( Qty Qty GetAsText (â€Quote") ) Quote Link to comment Share on other sites More sharing options...
AHunter3 Posted August 23, 2006 Share Posted August 23, 2006 Would this work? Case( Qty Qty GetAsText (â€Quote") ) Not in a calculaton field of type "number". You can do it in a calculation field of type "text" (and don't need GetAsText for that). But then you can't do finds and sorts and sum-ups on the calc field assuming it to be a number. It wont behave like a number field even when it contains numbers, once it's designated as a text calc field. Quote Link to comment Share on other sites More sharing options...
Robert Schaub Posted August 24, 2006 Share Posted August 24, 2006 Not in a calculaton field of type "number". You can do it in a calculation field of type "text" (and don't need GetAsText for that). But then you can't do finds and sorts and sum-ups on the calc field assuming it to be a number. It wont behave like a number field even when it contains numbers, once it's designated as a text calc field. First Never say Never... Attached is a zip with pdf of field defs and a screen shot of results. Yes when mouse is not in the field... nothing.... But click in the field and see what's in it. I am not saying I am right or this is the answer..... I am saying Never say Never. Second..... Wow 52 Posts in since you joined on 8-20-2006 (4 days) ........Got a lot of time on your hands? Quote Link to comment Share on other sites More sharing options...
blevey Posted August 24, 2006 Author Share Posted August 24, 2006 First Never say Never... Attached is a zip with pdf of field defs and a screen shot of results. Yes when mouse is not in the field... nothing.... But click in the field and see what's in it.I am not saying I am right or this is the answer..... I am saying Never say Never. Yes, In my original works, this is how it worked, when clicking in the field it showed the quote, but once out it was gone, and is what lead me to the question... I could always do it with two fields, the first one being the calc, number field with Case(Qty Quote Link to comment Share on other sites More sharing options...
AHunter3 Posted August 24, 2006 Share Posted August 24, 2006 Second..... Wow 52 Posts in since you joined on 8-20-2006 (4 days) ........Got a lot of time on your hands? Yes, I'm bored out of my skull. I'm overpaid to babysit a tertiary database for which no one has any design responsibilities. Change requests are rare and most often consist of 11-second stuff like "Could you add a checkbox field over here?" and "Can you make this field wider when it prints out?" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.