Re: How to get numbers caculated to appear in layout.
- From: Dwight Yoakam <steve@xxxxxxxxxx>
- Date: Sat, 19 Jul 2008 20:33:20 -0400
On 2008-07-16 00:11:38 -0400, Helpful Harry <helpful_harry@xxxxxxxxxxxxxxxx> said:
In article <2008071422494516807-steve@hgcafecom>, Dwight YoakamYou have no idea!!!!!!!!
<steve@xxxxxxxxxx> wrote:
I have a calculation that choses between 5 different machines (based on
a set of parameters). These machines have their own tables and are
related to a main layout called "Inquiry". The result is given in a
field "loc_level" (eg, "L2", "L4", L7,...etc.). From that result I am
trying to do a few things:
Each machine does certain processes and the client pays per process but
not necessarily all the processes the machine is capable of doing. For
example:
The customer orders a coil of steel that is 16 inches wide, 250
inches
in length and 1/4 inches thick. From the results calculated, this coil
needs to go to "L2". To use L2 will automatically cost the client $2.00
everytime. Because the coil is also less than 48 inches wide, it will
cost the customer $.50. There is another process the client will not
have to pay for and that is if the coil is less than 80", then another
$1 is tacked on (but again, not in this case).
Minimally, I would like to construct a calculation that "figures out"
which costs will be used and add them up internally and spit the answer
out in a field that will be added in later after all the processes not
related to the "L Family" have been tabulated.
Ideally, I would like to have each process cost, IF USED, appear in its
own field (showing which processes have been or not been used).
I already have all the machines in a layout with all the potential
costs in Global fields.
I also have already tried to put together a calculation which has
failed (no numbers appear in the layout) WITHOUT using global fields:
Let(
[A=Case ((loc_leveler<>"L2");"";
LEVELER_2_PRICE_COST_SCHEDULE::scrap%=.015;
LEVELER_2_PRICE_COST_SCHEDULE::coil_spec_cost=2;
width_exit â?¥ 3 and width_exit â?¤ 6;
LEVELER_2_PRICE_COST_SCHEDULE::three_six_wide=1.5;
length_total_max < 80; LEVELER_2_PRICE_COST_SCHEDULE::less_eighty_long=.5;
ga_min_total â?¥ .067 and ga_max_total â?¤ .081;
LEVELER_2_PRICE_COST_SCHEDULE::fourteen_ga=1;
ga_min_total â?¥ .053 and ga_max_total â?¤ .065;
LEVELER_2_PRICE_COST_SCHEDULE::sixteen_ga =1.5);
B=Case ((loc_leveler<>"L5");"";
LEVELER_5_PRICE_COST_SCHEDULE::scrap%=.02;
LEVELER_5_PRICE_COST_SCHEDULE::six_ten_eighty_144=2;
width_exit â?¥ 3 and width_exit â?¤ 6;
LEVELER_5_PRICE_COST_SCHEDULE::three_six_wide=1.5;"";
length_total_max < 80;
LEVELER_5_PRICE_COST_SCHEDULE::less_eighty_long=.5;"")];
Case (not IsEmpty (A); A; not IsEmpty (B); B))
Any ideas would be most beneficial for I am stuck in the mud. Thank you
in advance.
Steve
I'm not sure what you're trying to calculate / achieve with this
function, but there is no actual calculation in there, so you won't get
any numerical answer.
The Case statements for A and B are also rather screwy and can't give
any sensible result. A Case statement needs to be structured as:
Case ( Test #1; Result #1;
Test #2; Result #2;
Test #3; Result #3;
...
Optional Result If All Tests Fail
)
The "Result" parts usually do not include "=" symbols, just an actual
value or fields name.
It almost looks like you're trying to set multiple fields values using
one Calculation, but this isn't possible. A Calculation only sets one
field, so to set multiple values you need multiple calculations.
Plus, it sounds like you cost structure is FAR too complicated and
based on far to many variables - "if this, then that, but not if
such-and-such, and not in this case, ...". You're asking for trouble
with such an over-complicated set-up. :o\
Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)
In an earlier post called "Logical Calculation Problem" you said:
I guess what I had in mind was storing the parameters in script variables, going to a separate table where all the machines are defined, and then looping through those machine records until we find a set of machine parameters that matches our job variables.
I tried to figure out the script but failed miserably. If you have any sugestions I am extremely open to them.
Thank you,
Steve
--
.
- Follow-Ups:
- References:
- How to get numbers caculated to appear in layout.
- From: Dwight Yoakam
- Re: How to get numbers caculated to appear in layout.
- From: Helpful Harry
- How to get numbers caculated to appear in layout.
- Prev by Date: Re: Invoice with two currencies`
- Next by Date: Re: Confirmation window before exiting FM ?
- Previous by thread: Re: How to get numbers caculated to appear in layout.
- Next by thread: Re: How to get numbers caculated to appear in layout.
- Index(es):
Relevant Pages
|
Loading