Where to put calculation in configurator

Thank you, after finding the few things i had wrong it works.

--- In vantage@yahoogroups.com, "Mark Wonsil" <mark_wonsil@...> wrote:
>
>
> > I tried removing the quotes and am still generating the error. is
it
> > because i have more then 2 input parameters?
>
> Nah, I have the same number as you do.
>
> > Error: The following application error was encountered:
> >
> > The process caller failed to invoke method LaunchForm in
> > Epicor.Mfg.UI.App.Launch in
> > c:\epicor\client\Epicor.Mfg.UI.ConfigurationEntry
>
> OK, we'll assume that the path is correct, etc. Start up the
Progress Client
> (Start | Open Edge 10.1B | Client), text in your program. On the
menu choose
> Compile | Check Syntax and see if there are any errors that may
have crept
> in.
>
> Mark W.
>
I am working on my first configurator project and have a question. I
am doing some fairly complex horse power calculation based on the
information entered on the first page. The calcs include CASE
statements, and simple arithmetic. Right now I have the calculations
entered in the "On Leave" portion of the last entry field on that
screen. That works fine unless the user changes other fields after
making their selection in the last field. Is there a better place to
be entering these formulas?

Mark Tellefson
IT Manager
Rapat Corporation
I use a checkbox on my Last Page so that the user uses it like a Calculate
Button. Check or even Uncheck the box and it runs my calculations.

Scott Litzau, MCP
Olympus Flag & Banner
Information Systems Manager
scott.litzau@...
P: 414-365-9732
F: 414-355-1931


-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
rapat_mark
Sent: Monday, May 19, 2008 2:08 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Where to put calculation in configurator

I am working on my first configurator project and have a question. I
am doing some fairly complex horse power calculation based on the
information entered on the first page. The calcs include CASE
statements, and simple arithmetic. Right now I have the calculations
entered in the "On Leave" portion of the last entry field on that
screen. That works fine unless the user changes other fields after
making their selection in the last field. Is there a better place to
be entering these formulas?

Mark Tellefson
IT Manager
Rapat Corporation


------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
I use program files when calcualtions get complicated. That way I can
also call the program in the OnLeave event of each filed that would
effect the calculation.

To call a program from inside an OnLeave event, use the following
syntax:

run \\{UNCPath}\{FileName} (param1, param2, param3, {...}, output
{variable or object}).

Example:
run \\fs1\epicor\mfgsys803\server\ud\ProdCfg\OHM_LAW.p
(P01_Dec_Voltage, P01_Dec_Amperage, output P01_Dec_Resistance).


the OHMS_LAW.p file would consist of the following:
/***************************************************/
/* Perform Calcs */
/***************************************************/

DEF INPUT PARAM dVoltage AS DECIMAL NO-UNDO.
DEF INPUT PARAM dAmperage AS DECIMAL NO-UNDO.
DEF OUTPUT PARAM dResistance AS CHAR NO-UNDO.

IF dAmperage = 0 THEN dResistance = -1 ELSE dResistance = dVoltage /
dAmperage.

/*************** END OF FILE OHMS_LAW.P *************/


I personally find it much easier to edit the .p files in a text editor
like notepad (or my favorite: notepad2.exe)

Maybe that was more than you asked for, but it might be helpful in the
future.

Calvin Krusen


--- In vantage@yahoogroups.com, "rapat_mark" <mtellefson@...> wrote:
>
> I am working on my first configurator project and have a question. I
> am doing some fairly complex horse power calculation based on the
> information entered on the first page. The calcs include CASE
> statements, and simple arithmetic. Right now I have the calculations
> entered in the "On Leave" portion of the last entry field on that
> screen. That works fine unless the user changes other fields after
> making their selection in the last field. Is there a better place to
> be entering these formulas?
>
> Mark Tellefson
> IT Manager
> Rapat Corporation
>
Thank you both for the input. I found out that even though the
calculations didn't appear to update on the first entry page, when I
referenced it in later pages it was recalculated. It won't be displayed
on the first page anyway...it is just there for troubleshooting.



I like the idea of calling a program file. It seems like a much cleaner
way of doing it.



Next question...Can anyone tell me when and how you would use a "Prompt
When"? I can't find anything in the archives here or the help files.



Mark



________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Calvin Krusen
Sent: Monday, May 19, 2008 3:56 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Where to put calculation in configurator



I use program files when calcualtions get complicated. That way I can
also call the program in the OnLeave event of each filed that would
effect the calculation.

To call a program from inside an OnLeave event, use the following
syntax:

run \\{UNCPath}\{FileName} (param1, param2, param3, {...}, output
{variable or object}).

Example:
run \\fs1\epicor\mfgsys803\server\ud\ProdCfg\OHM_LAW.p
(P01_Dec_Voltage, P01_Dec_Amperage, output P01_Dec_Resistance).

the OHMS_LAW.p file would consist of the following:
/***************************************************/
/* Perform Calcs */
/***************************************************/

DEF INPUT PARAM dVoltage AS DECIMAL NO-UNDO.
DEF INPUT PARAM dAmperage AS DECIMAL NO-UNDO.
DEF OUTPUT PARAM dResistance AS CHAR NO-UNDO.

IF dAmperage = 0 THEN dResistance = -1 ELSE dResistance = dVoltage /
dAmperage.

/*************** END OF FILE OHMS_LAW.P *************/

I personally find it much easier to edit the .p files in a text editor
like notepad (or my favorite: notepad2.exe)

Maybe that was more than you asked for, but it might be helpful in the
future.

Calvin Krusen

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
"rapat_mark" <mtellefson@...> wrote:
>
> I am working on my first configurator project and have a question. I
> am doing some fairly complex horse power calculation based on the
> information entered on the first page. The calcs include CASE
> statements, and simple arithmetic. Right now I have the calculations
> entered in the "On Leave" portion of the last entry field on that
> screen. That works fine unless the user changes other fields after
> making their selection in the last field. Is there a better place to
> be entering these formulas?
>
> Mark Tellefson
> IT Manager
> Rapat Corporation
>





[Non-text portions of this message have been removed]
First thing to do is to goto the EpicWeb site and download the
Product Configurator Guide at:

https://epicweb.epicor.com/doc/Vantage%20803404%20Online%
20Help/Vantage/Product_Configurator/AdvTopProdConfigTechRef.htm

The PromtWhen should really be called EnableObjectWhen. The rules
in the PromptWhen determine when the object will be accessable to
the user.

Calvin Krusen

--- In vantage@yahoogroups.com, "Mark Tellefson" <mtellefson@...>
wrote:
>
> Thank you both for the input. I found out that even though the
> calculations didn't appear to update on the first entry page, when
I
> referenced it in later pages it was recalculated. It won't be
displayed
> on the first page anyway...it is just there for troubleshooting.
>
>
>
> I like the idea of calling a program file. It seems like a much
cleaner
> way of doing it.
>
>
>
> Next question...Can anyone tell me when and how you would use
a "Prompt
> When"? I can't find anything in the archives here or the help
files.
>
>
>
> Mark
>
>
>
> ________________________________
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
Behalf
> Of Calvin Krusen
> Sent: Monday, May 19, 2008 3:56 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: Where to put calculation in configurator
>
>
>
> I use program files when calcualtions get complicated. That way I
can
> also call the program in the OnLeave event of each filed that
would
> effect the calculation.
>
> To call a program from inside an OnLeave event, use the following
> syntax:
>
> run \\{UNCPath}\{FileName} (param1, param2, param3, {...}, output
> {variable or object}).
>
> Example:
> run \\fs1\epicor\mfgsys803\server\ud\ProdCfg\OHM_LAW.p
> (P01_Dec_Voltage, P01_Dec_Amperage, output P01_Dec_Resistance).
>
> the OHMS_LAW.p file would consist of the following:
> /***************************************************/
> /* Perform Calcs */
> /***************************************************/
>
> DEF INPUT PARAM dVoltage AS DECIMAL NO-UNDO.
> DEF INPUT PARAM dAmperage AS DECIMAL NO-UNDO.
> DEF OUTPUT PARAM dResistance AS CHAR NO-UNDO.
>
> IF dAmperage = 0 THEN dResistance = -1 ELSE dResistance =
dVoltage /
> dAmperage.
>
> /*************** END OF FILE OHMS_LAW.P *************/
>
> I personally find it much easier to edit the .p files in a text
editor
> like notepad (or my favorite: notepad2.exe)
>
> Maybe that was more than you asked for, but it might be helpful in
the
> future.
>
> Calvin Krusen
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> "rapat_mark" <mtellefson@> wrote:
> >
> > I am working on my first configurator project and have a
question. I
> > am doing some fairly complex horse power calculation based on the
> > information entered on the first page. The calcs include CASE
> > statements, and simple arithmetic. Right now I have the
calculations
> > entered in the "On Leave" portion of the last entry field on that
> > screen. That works fine unless the user changes other fields
after
> > making their selection in the last field. Is there a better
place to
> > be entering these formulas?
> >
> > Mark Tellefson
> > IT Manager
> > Rapat Corporation
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
You use a Prompt When rule to determine if the input should be grayed
out (available to use or change). Many times inputs are mutually
exclusive, where the choice of one input makes another input impossible.


For instance, if inputs p1_value and p1_trim are mutually exclusive, you
would put a Prompt When rule on the input that comes after the other.
You can only write a Prompt When rule against a previous input (as
listed in the order of inputs). If p1_value came first, you would write
a Prompt When rule in p1_trim that says (Not p1_value) if p1_value were
a checkbox input. This means prompt for this input if p1_value is false.

Hope this helps.

Russell Wright
Controller
Triton Industries, Inc.
Phone (517) 322-3822
Fax (517) 322-3872




[Non-text portions of this message have been removed]
Excellent...I was trying to figure out how to display some of the
calculated data without allowing the user to be able to change it. Is
there a way to make fields invisible?



________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Russell Wright
Sent: Tuesday, May 20, 2008 8:34 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Where to put calculation in configurator



You use a Prompt When rule to determine if the input should be grayed
out (available to use or change). Many times inputs are mutually
exclusive, where the choice of one input makes another input impossible.

For instance, if inputs p1_value and p1_trim are mutually exclusive, you
would put a Prompt When rule on the input that comes after the other.
You can only write a Prompt When rule against a previous input (as
listed in the order of inputs). If p1_value came first, you would write
a Prompt When rule in p1_trim that says (Not p1_value) if p1_value were
a checkbox input. This means prompt for this input if p1_value is false.

Hope this helps.

Russell Wright
Controller
Triton Industries, Inc.
Phone (517) 322-3822
Fax (517) 322-3872



[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
> Excellent...I was trying to figure out how to display some of the
> calculated data without allowing the user to be able to change it. Is
> there a way to make fields invisible?

Change its height and width to zero.

Mark W.
I am trying to use the code below as an example. I am confused at one
point. Where do i tell the program which variable belongs to which
field on the input screen of the configurator.

I have tried the code, and put the stuff in the on leave, and go to
test inputs and now i am getting this message.

The following application error was encountered:

The process caller failed to invoke method LaunchForm in
Epicor.Mfg.UI.App.Launch in
c:\epicor\client\Epicor.Mfg.UI.ConfigurationEntry

If i take the code out of the on leave tab, the test inputs works
fine.

The code that i am using on the on leave is as follows.
run "\\mgsserver4\epicor\mfgsys80
\Server\ud\ConfiguratorStuff\Actual_Gallons.p"
(P01_DEC_TANKHEIGHT, P01_DEC_TANKLENGTH, P01_DEC_TANKWIDTH,
P01_DEC_RUPTUREBASINSIZE, OUTPUT P01_DEC_ACTUALGALOUTPUT).

My .p file looks like this:

/******Actual Gallons Calculation******/

DEF INPUT PARAM height AS DECIMAL NO-UNDO.
DEF INPUT PARAM length AS DECIMAL NO-UNDO.
DEF INPUT PARAM Width AS DECIMAL NO-UNDO
DEF INPUT PARAM RupBas AS DECIMAL NO-UNDO.
DEF OUTPUT PARAM ActGal AS DECIMAL NO-UNDO.

ActGal = height + length + width + RupBas

/******End Actual Gallons Calculation******/

I have it doing a very simple calculation just to see if it works
before i put the real math in.

Please tell me where i am going wrong. I am very new to this and am
struggling through this. Thanks

--- In vantage@yahoogroups.com, "Calvin Krusen" <ckrusen@...> wrote:
>
> I use program files when calcualtions get complicated. That way I
can
> also call the program in the OnLeave event of each filed that would
> effect the calculation.
>
> To call a program from inside an OnLeave event, use the following
> syntax:
>
> run \\{UNCPath}\{FileName} (param1, param2, param3, {...}, output
> {variable or object}).
>
> Example:
> run \\fs1\epicor\mfgsys803\server\ud\ProdCfg\OHM_LAW.p
> (P01_Dec_Voltage, P01_Dec_Amperage, output P01_Dec_Resistance).
>
>
> the OHMS_LAW.p file would consist of the following:
> /***************************************************/
> /* Perform Calcs */
> /***************************************************/
>
> DEF INPUT PARAM dVoltage AS DECIMAL NO-UNDO.
> DEF INPUT PARAM dAmperage AS DECIMAL NO-UNDO.
> DEF OUTPUT PARAM dResistance AS CHAR NO-UNDO.
>
> IF dAmperage = 0 THEN dResistance = -1 ELSE dResistance =
dVoltage /
> dAmperage.
>
> /*************** END OF FILE OHMS_LAW.P *************/
>
>
> I personally find it much easier to edit the .p files in a text
editor
> like notepad (or my favorite: notepad2.exe)
>
> Maybe that was more than you asked for, but it might be helpful in
the
> future.
>
> Calvin Krusen
>
>
> --- In vantage@yahoogroups.com, "rapat_mark" <mtellefson@> wrote:
> >
> > I am working on my first configurator project and have a
question. I
> > am doing some fairly complex horse power calculation based on the
> > information entered on the first page. The calcs include CASE
> > statements, and simple arithmetic. Right now I have the
calculations
> > entered in the "On Leave" portion of the last entry field on that
> > screen. That works fine unless the user changes other fields
after
> > making their selection in the last field. Is there a better
place to
> > be entering these formulas?
> >
> > Mark Tellefson
> > IT Manager
> > Rapat Corporation
> >
>
> The code that i am using on the on leave is as follows.
> run "\\mgsserver4\epicor\mfgsys80
> \Server\ud\ConfiguratorStuff\Actual_Gallons.p"
> (P01_DEC_TANKHEIGHT, P01_DEC_TANKLENGTH, P01_DEC_TANKWIDTH,
> P01_DEC_RUPTUREBASINSIZE, OUTPUT P01_DEC_ACTUALGALOUTPUT).

Calvin previously wrote:

> >
> > To call a program from inside an OnLeave event, use the following
> > syntax:
> >
> > run \\{UNCPath}\{FileName} (param1, param2, param3, {...}, output
> > {variable or object}).
> >
> > Example:
> > run \\fs1\epicor\mfgsys803\server\ud\ProdCfg\OHM_LAW.p
> > (P01_Dec_Voltage, P01_Dec_Amperage, output P01_Dec_Resistance).

So try removing the quotation marks from the run string.

FWIW, I don't use the full path in my onleave events. They look like:

run ud\ConfiguratorStuff\filename.p (p1, p2, output p3).

Mark W.
I tried removing the quotes and am still generating the error. is it
because i have more then 2 input parameters?

Error: The following application error was encountered:

The process caller failed to invoke method LaunchForm in
Epicor.Mfg.UI.App.Launch in
c:\epicor\client\Epicor.Mfg.UI.ConfigurationEntry

New code looks like:
run ud\ConfiguratorStuff\Actual_Gallons.p
(P01_DEC_TANKHEIGHT, P01_DEC_TANKLENGTH, P01_DEC_TANKWIDTH,
P01_DEC_RUPTUREBASINSIZE, OUTPUT P01_DEC_ACTUALGALOUTPUT).

--- In vantage@yahoogroups.com, "Mark Wonsil" <mark_wonsil@...> wrote:
>
> > The code that i am using on the on leave is as follows.
> > run "\\mgsserver4\epicor\mfgsys80
> > \Server\ud\ConfiguratorStuff\Actual_Gallons.p"
> > (P01_DEC_TANKHEIGHT, P01_DEC_TANKLENGTH, P01_DEC_TANKWIDTH,
> > P01_DEC_RUPTUREBASINSIZE, OUTPUT P01_DEC_ACTUALGALOUTPUT).
>
> Calvin previously wrote:
>
> > >
> > > To call a program from inside an OnLeave event, use the
following
> > > syntax:
> > >
> > > run \\{UNCPath}\{FileName} (param1, param2, param3, {...},
output
> > > {variable or object}).
> > >
> > > Example:
> > > run \\fs1\epicor\mfgsys803\server\ud\ProdCfg\OHM_LAW.p
> > > (P01_Dec_Voltage, P01_Dec_Amperage, output P01_Dec_Resistance).
>
> So try removing the quotation marks from the run string.
>
> FWIW, I don't use the full path in my onleave events. They look
like:
>
> run ud\ConfiguratorStuff\filename.p (p1, p2, output p3).
>
> Mark W.
>
> I tried removing the quotes and am still generating the error. is it
> because i have more then 2 input parameters?

Nah, I have the same number as you do.

> Error: The following application error was encountered:
>
> The process caller failed to invoke method LaunchForm in
> Epicor.Mfg.UI.App.Launch in
> c:\epicor\client\Epicor.Mfg.UI.ConfigurationEntry

OK, we'll assume that the path is correct, etc. Start up the Progress Client
(Start | Open Edge 10.1B | Client), text in your program. On the menu choose
Compile | Check Syntax and see if there are any errors that may have crept
in.

Mark W.