| Author |
Message |
Pijnarie
Newbie
Joined: 13 Feb 2014
Location: Netherlands
Online Status: Offline
Posts: 2
|

Topic: wrong formula? Posted: 20 Feb 2014 at 11:32pm |
|
I am new to this forum and want to check if someone has an other solution for my formula.
I want to create a "quotation prediction list".
We have a list which is grouped by our sales people.( group 1)
In this group our people has several qoutations (also a group).
Each quotation exists of difrerent lines/articles.
these lines contains:
- Part number
- description
- amount
- price etc.
We have come up with with the idea of creating an article for our "prediction" which has part number "calc00260". (we have to do this because our current ERP-system has not a solution for this at the moment).
When you add this articles to you quotation you have to fill in the "amount-field". This will be used as a
%-field for the possibility to succeed.
For our report I made the next formula:
global numbervar percent := 0;
if {vofr.part_code} = "calc00260" then
percent := {vofr.vofr_amount}
else
percent := 0
the result I get back is (when I have filled in 50 at the amount at part-code calc00260:
50
0
0
0
0
When i summarize this (or max) i will get the right answer for each of my quotation, but is there a way to do this?
|
IP Logged |
|
|
|
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
|

Posted: 21 Feb 2014 at 4:57am |
|
I am not sure what you are asking...
Do you want to do something like this for many parts or just the one part.
If you are doing for lots of parts, you could create a table that stores the values, then you could link (probably and outer link) to the table.
If you only want to do this for 1 part at a time, you could make the part number a parameter as well as the amount...and what you have is probably as good as anything.
as a minor note, you don't need the else, you already set the value to 0, so only if the part number matches does percent change.
Of course, I could be that I misunderstand what you are trying to accomplish
HTH
|
IP Logged |
|
hello
Groupie
Joined: 05 Feb 2014
Online Status: Offline
Posts: 85
|

Posted: 21 Feb 2014 at 8:47am |
|
Sounds to me like the formula works...your input was 50, and it returned 50.
If you are trying to get a percentage conversion of the sales ticket using the "amount field", then the formula will need the % function:
global numbervar percent := 0;
if {vofr.part_code} = "calc00260" then
percent := {amount_field}%{invoice_total_amount}
else
percent := 0
Edited by hello - 21 Feb 2014 at 9:18am
|
IP Logged |
|
|
|