Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
Solved

# Prices / currency calculation in a view

Posted on 2004-08-09
Medium Priority
286 Views
I would like to do the following in a view formula: have it display a price (which is entered on the document by the user), calculate the tax (7% Canadian GST), and add it to the price for a total.

i.e. to have the view column formulate something like the following: \$1,295.00 + \$90.65 = \$1,385.65 (if the "price" field contains \$1,295.00)

The problem I am having is that the view column converts the currency amount to a plain number (i.e. \$1,295.00 to 1295), but when I configure the column for currency it will not accept the any text strings (" + ", " = ", etc.).

Is there any way to get the view column to calculate and display like this -- \$1,295.00 + \$90.65 = \$1,385.65 ?

-Ke
0
Question by:kkiddie
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 15

Accepted Solution

Bozzie4 earned 800 total points
ID: 11759742
You can, using a string (you'll need to adapt the rounding rules to what applies in Canada) :

price := mypricefield;
tax := price*7/100;
total := @round(price + tax;1/100);
@text( price; "C,2")+ " + " + @text( tax; "C,2") + " = " + @text( total; "C,2")

But you will probably want these values in your documents too, so it's better to do these calculations in fields in your documents !

cheers,

Tom

0

Author Comment

ID: 11761967
Thanks, Tom. It works.

I should have read more of the @Text help, I guess the answer was there... Still it is helpful for me as a beginning coder to see your approach.

Cheers,

-Kendall
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
###### Suggested Courses
Course of the Month8 days, 17 hours left to enroll