Progress 4gl Array

Unfortunately in E9 there is no actual pop-up.  I have a text box that is labeled Error Messages and populate that with the errors/messages.  Some others on the list may have a better solution, but I could never get it to work myself.  E10, I pop-up all kinds of fun things because you can create your own forms with C# and that has opened a whole new arena.

 

Brenda

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 10:12 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Progress 4gl Array

 

 

Thanks Brenda, one last question about your code.  How do you display your warning message(setMsg) to the user in the configurator?  I do love your message.  I may have to implement something like that in ours!

 

On Wed, Jul 15, 2015 at 8:55 AM, brenda mohr brenda@... [vantage] <vantage@yahoogroups.com> wrote:

 

You can get creative with it.  Here is an actual example from my configurator where I am calculating the total weight of all cores on a particular quote:

 

DEF VAR aBoxQP AS DECIMAL EXTENT 200.

DEF VAR amyWeight AS DECIMAL EXTENT 200.

DEF VAR i AS INTEGER INIT 1.    

 

FOR EACH PcInValue WHERE (PcInValue.Company = (GetCurrentCompany())) AND (PcInValue.QuoteNum = setQuoteNum) no-lock.

 

     IF (PcInValue.QuoteLine > 200) THEN DO:

          setMsg = "SERIOUSLY!???  You quoted more than 200 Boxes??  Abort, Go See Brenda".

          idiot = TRUE.

     END.

 

     IF (NOT idiot) THEN DO:

 

          IF (PcInValue.InputName = "decCavPP1")      THEN aBoxQP[PcInValue.QuoteLine] = integer(PcInValue.InputValue).

          IF (PcInValue.InputName = "humdecCavWt1") THEN amyWeight[PcInValue.QuoteLine] = decimal(PcInValue.InputValue).

 

     END. /*** idiot check ***/

 

END. /*** PcInValue ***/

 

i = 1.

DO i = 1 TO setTotBox:

 

     myWeight = myWeight + (amyWeight[i] * aBoxQP[i]).

 

END.

 

Brenda

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 8:41 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Progress 4gl Array

 

 

Thanks!

 

Is the only way to assign initial values like the following:

myVariable[1] = 10

myVariable[2] = 20

 

Can I not do something like javascript: array-name = [item1, item2, ...];

 

On Wed, Jul 15, 2015 at 8:33 AM, brenda mohr brenda@... [vantage] <vantage@yahoogroups.com> wrote:

 

Here is a very basic example:

 

DEF VAR myVariable AS INTEGER EXTENT 5.

DEF VAR mySum AS INTEGER INIT 0.

DEF VAR i AS INTEGER INIT 1.

 

myVariable[1] = 10

myVariable[2] = 20

myVariable[3] = 30

myVariable[4] = 14

myVariable[5] = 15

 

DO i = 1 TO 5:

     mySum = mySum + myVariable[i]

END.

 

 

Brenda

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 8:14 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Progress 4gl Array

 

 

Can anyone tell me how to do an array in progress 4gl?  I can't seem to get the syntax right.  I just want to declare an array and assign it a few initial values.  Thanks.



 

--

Jeff & Stephanie Purvis



 

--

Jeff & Stephanie Purvis

Can anyone tell me how to do an array in progress 4gl?  I can't seem to get the syntax right.  I just want to declare an array and assign it a few initial values.  Thanks.

Here is a very basic example:

 

DEF VAR myVariable AS INTEGER EXTENT 5.

DEF VAR mySum AS INTEGER INIT 0.

DEF VAR i AS INTEGER INIT 1.

 

myVariable[1] = 10

myVariable[2] = 20

myVariable[3] = 30

myVariable[4] = 14

myVariable[5] = 15

 

DO i = 1 TO 5:

     mySum = mySum + myVariable[i]

END.

 

 

Brenda

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 8:14 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Progress 4gl Array

 

 

Can anyone tell me how to do an array in progress 4gl?  I can't seem to get the syntax right.  I just want to declare an array and assign it a few initial values.  Thanks.

Thanks!

Is the only way to assign initial values like the following:

myVariable[1] = 10

myVariable[2] = 20


Can I not do something like javascript: array-name = [item1, item2, ...];


On Wed, Jul 15, 2015 at 8:33 AM, brenda mohr brenda@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>

Here is a very basic example:

Â

DEF VAR myVariable AS INTEGER EXTENT 5.

DEF VAR mySum AS INTEGER INIT 0.

DEF VAR i AS INTEGER INIT 1.

Â

myVariable[1] = 10

myVariable[2] = 20

myVariable[3] = 30

myVariable[4] = 14

myVariable[5] = 15

Â

DO i = 1 TO 5:

    mySum = mySum + myVariable[i]

END.

Â

Â

Brenda

Â

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 8:14 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Progress 4gl Array

Â

Â

Can anyone tell me how to do an array in progress 4gl? I can't seem to get the syntax right. I just want to declare an array and assign it a few initial values. Thanks.

</div>
 


<div style="color:#fff;min-height:0;"></div>



--

Jeff & Stephanie Purvis

You can get creative with it.  Here is an actual example from my configurator where I am calculating the total weight of all cores on a particular quote:

 

DEF VAR aBoxQP AS DECIMAL EXTENT 200.

DEF VAR amyWeight AS DECIMAL EXTENT 200.

DEF VAR i AS INTEGER INIT 1.    

 

FOR EACH PcInValue WHERE (PcInValue.Company = (GetCurrentCompany())) AND (PcInValue.QuoteNum = setQuoteNum) no-lock.

 

     IF (PcInValue.QuoteLine > 200) THEN DO:

          setMsg = "SERIOUSLY!???  You quoted more than 200 Boxes??  Abort, Go See Brenda".

          idiot = TRUE.

     END.

 

     IF (NOT idiot) THEN DO:

 

          IF (PcInValue.InputName = "decCavPP1")      THEN aBoxQP[PcInValue.QuoteLine] = integer(PcInValue.InputValue).

          IF (PcInValue.InputName = "humdecCavWt1") THEN amyWeight[PcInValue.QuoteLine] = decimal(PcInValue.InputValue).

 

     END. /*** idiot check ***/

 

END. /*** PcInValue ***/

 

i = 1.

DO i = 1 TO setTotBox:

 

     myWeight = myWeight + (amyWeight[i] * aBoxQP[i]).

 

END.

 

Brenda

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 8:41 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Progress 4gl Array

 

 

Thanks!

 

Is the only way to assign initial values like the following:

myVariable[1] = 10

myVariable[2] = 20

 

Can I not do something like javascript: array-name = [item1, item2, ...];

 

On Wed, Jul 15, 2015 at 8:33 AM, brenda mohr brenda@... [vantage] <vantage@yahoogroups.com> wrote:

 

Here is a very basic example:

 

DEF VAR myVariable AS INTEGER EXTENT 5.

DEF VAR mySum AS INTEGER INIT 0.

DEF VAR i AS INTEGER INIT 1.

 

myVariable[1] = 10

myVariable[2] = 20

myVariable[3] = 30

myVariable[4] = 14

myVariable[5] = 15

 

DO i = 1 TO 5:

     mySum = mySum + myVariable[i]

END.

 

 

Brenda

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 8:14 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Progress 4gl Array

 

 

Can anyone tell me how to do an array in progress 4gl?  I can't seem to get the syntax right.  I just want to declare an array and assign it a few initial values.  Thanks.



 

--

Jeff & Stephanie Purvis

Brenda, you really have that in your configurator?!?  I’m laughing back here!

Manasa

 

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 8:55 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Progress 4gl Array

 

 

You can get creative with it.  Here is an actual example from my configurator where I am calculating the total weight of all cores on a particular quote:

 

DEF VAR aBoxQP AS DECIMAL EXTENT 200.

DEF VAR amyWeight AS DECIMAL EXTENT 200.

DEF VAR i AS INTEGER INIT 1.    

 

FOR EACH PcInValue WHERE (PcInValue.Company = (GetCurrentCompany())) AND (PcInValue.QuoteNum = setQuoteNum) no-lock.

 

     IF (PcInValue.QuoteLine > 200) THEN DO:

          setMsg = "SERIOUSLY!???  You quoted more than 200 Boxes??  Abort, Go See Brenda".

          idiot = TRUE.

     END.

 

     IF (NOT idiot) THEN DO:

 

          IF (PcInValue.InputName = "decCavPP1")      THEN aBoxQP[PcInValue.QuoteLine] = integer(PcInValue.InputValue).

          IF (PcInValue.InputName = "humdecCavWt1") THEN amyWeight[PcInValue.QuoteLine] = decimal(PcInValue.InputValue).

 

     END. /*** idiot check ***/

 

END. /*** PcInValue ***/

 

i = 1.

DO i = 1 TO setTotBox:

 

     myWeight = myWeight + (amyWeight[i] * aBoxQP[i]).

 

END.

 

Brenda

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 8:41 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Progress 4gl Array

 

 

Thanks!

 

Is the only way to assign initial values like the following:

myVariable[1] = 10

myVariable[2] = 20

 

Can I not do something like javascript: array-name = [item1, item2, ...];

 

On Wed, Jul 15, 2015 at 8:33 AM, brenda mohr brenda@... [vantage] <vantage@yahoogroups.com> wrote:

 

Here is a very basic example:

 

DEF VAR myVariable AS INTEGER EXTENT 5.

DEF VAR mySum AS INTEGER INIT 0.

DEF VAR i AS INTEGER INIT 1.

 

myVariable[1] = 10

myVariable[2] = 20

myVariable[3] = 30

myVariable[4] = 14

myVariable[5] = 15

 

DO i = 1 TO 5:

     mySum = mySum + myVariable[i]

END.

 

 

Brenda

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 8:14 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Progress 4gl Array

 

 

Can anyone tell me how to do an array in progress 4gl?  I can't seem to get the syntax right.  I just want to declare an array and assign it a few initial values.  Thanks.



 

--

Jeff & Stephanie Purvis

IMPORTANT NOTICE FROM API: This communication, including any attachments, contains information that may be confidential or privileged and is intended solely for the entity or individual to whom it is addressed. If you are not the intended recipient, please contact the sender immediately and delete this message. Any unauthorized disclosure, copying or distribution of this message is strictly prohibited.

IMPORTANT NOTICE FROM API: This communication, including any attachments, contains information that may be confidential or privileged and is intended solely for the entity or individual to whom it is addressed. If you are not the intended recipient, please contact the sender immediately and delete this message. Any unauthorized disclosure, copying or distribution of this message is strictly prohibited.

Yes, as well as error notifications that require Chocolate to get them past.  My office fridge currently has two large boxes of chocolate in it.

 

Brenda

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 9:16 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Progress 4gl Array

 

 

Brenda, you really have that in your configurator?!?  I’m laughing back here!

Manasa

 

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 8:55 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Progress 4gl Array

 

 

You can get creative with it.  Here is an actual example from my configurator where I am calculating the total weight of all cores on a particular quote:

 

DEF VAR aBoxQP AS DECIMAL EXTENT 200.

DEF VAR amyWeight AS DECIMAL EXTENT 200.

DEF VAR i AS INTEGER INIT 1.    

 

FOR EACH PcInValue WHERE (PcInValue.Company = (GetCurrentCompany())) AND (PcInValue.QuoteNum = setQuoteNum) no-lock.

 

     IF (PcInValue.QuoteLine > 200) THEN DO:

          setMsg = "SERIOUSLY!???  You quoted more than 200 Boxes??  Abort, Go See Brenda".

          idiot = TRUE.

     END.

 

     IF (NOT idiot) THEN DO:

 

          IF (PcInValue.InputName = "decCavPP1")      THEN aBoxQP[PcInValue.QuoteLine] = integer(PcInValue.InputValue).

          IF (PcInValue.InputName = "humdecCavWt1") THEN amyWeight[PcInValue.QuoteLine] = decimal(PcInValue.InputValue).

 

     END. /*** idiot check ***/

 

END. /*** PcInValue ***/

 

i = 1.

DO i = 1 TO setTotBox:

 

     myWeight = myWeight + (amyWeight[i] * aBoxQP[i]).

 

END.

 

Brenda

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 8:41 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Progress 4gl Array

 

 

Thanks!

 

Is the only way to assign initial values like the following:

myVariable[1] = 10

myVariable[2] = 20

 

Can I not do something like javascript: array-name = [item1, item2, ...];

 

On Wed, Jul 15, 2015 at 8:33 AM, brenda mohr brenda@... [vantage] <vantage@yahoogroups.com> wrote:

 

Here is a very basic example:

 

DEF VAR myVariable AS INTEGER EXTENT 5.

DEF VAR mySum AS INTEGER INIT 0.

DEF VAR i AS INTEGER INIT 1.

 

myVariable[1] = 10

myVariable[2] = 20

myVariable[3] = 30

myVariable[4] = 14

myVariable[5] = 15

 

DO i = 1 TO 5:

     mySum = mySum + myVariable[i]

END.

 

 

Brenda

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 8:14 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Progress 4gl Array

 

 

Can anyone tell me how to do an array in progress 4gl?  I can't seem to get the syntax right.  I just want to declare an array and assign it a few initial values.  Thanks.



 

--

Jeff & Stephanie Purvis

IMPORTANT NOTICE FROM API: This communication, including any attachments, contains information that may be confidential or privileged and is intended solely for the entity or individual to whom it is addressed. If you are not the intended recipient, please contact the sender immediately and delete this message. Any unauthorized disclosure, copying or distribution of this message is strictly prohibited.

IMPORTANT NOTICE FROM API: This communication, including any attachments, contains information that may be confidential or privileged and is intended solely for the entity or individual to whom it is addressed. If you are not the intended recipient, please contact the sender immediately and delete this message. Any unauthorized disclosure, copying or distribution of this message is strictly prohibited.

LOL, love it!    M

 

 

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 9:29 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Progress 4gl Array

 

 

Yes, as well as error notifications that require Chocolate to get them past.  My office fridge currently has two large boxes of chocolate in it.

 

Brenda

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 9:16 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Progress 4gl Array

 

 

Brenda, you really have that in your configurator?!?  I’m laughing back here!

Manasa

 

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 8:55 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Progress 4gl Array

 

 

You can get creative with it.  Here is an actual example from my configurator where I am calculating the total weight of all cores on a particular quote:

 

DEF VAR aBoxQP AS DECIMAL EXTENT 200.

DEF VAR amyWeight AS DECIMAL EXTENT 200.

DEF VAR i AS INTEGER INIT 1.    

 

FOR EACH PcInValue WHERE (PcInValue.Company = (GetCurrentCompany())) AND (PcInValue.QuoteNum = setQuoteNum) no-lock.

 

     IF (PcInValue.QuoteLine > 200) THEN DO:

          setMsg = "SERIOUSLY!???  You quoted more than 200 Boxes??  Abort, Go See Brenda".

          idiot = TRUE.

     END.

 

     IF (NOT idiot) THEN DO:

 

          IF (PcInValue.InputName = "decCavPP1")      THEN aBoxQP[PcInValue.QuoteLine] = integer(PcInValue.InputValue).

          IF (PcInValue.InputName = "humdecCavWt1") THEN amyWeight[PcInValue.QuoteLine] = decimal(PcInValue.InputValue).

 

     END. /*** idiot check ***/

 

END. /*** PcInValue ***/

 

i = 1.

DO i = 1 TO setTotBox:

 

     myWeight = myWeight + (amyWeight[i] * aBoxQP[i]).

 

END.

 

Brenda

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 8:41 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Progress 4gl Array

 

 

Thanks!

 

Is the only way to assign initial values like the following:

myVariable[1] = 10

myVariable[2] = 20

 

Can I not do something like javascript: array-name = [item1, item2, ...];

 

On Wed, Jul 15, 2015 at 8:33 AM, brenda mohr brenda@... [vantage] <vantage@yahoogroups.com> wrote:

 

Here is a very basic example:

 

DEF VAR myVariable AS INTEGER EXTENT 5.

DEF VAR mySum AS INTEGER INIT 0.

DEF VAR i AS INTEGER INIT 1.

 

myVariable[1] = 10

myVariable[2] = 20

myVariable[3] = 30

myVariable[4] = 14

myVariable[5] = 15

 

DO i = 1 TO 5:

     mySum = mySum + myVariable[i]

END.

 

 

Brenda

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 8:14 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Progress 4gl Array

 

 

Can anyone tell me how to do an array in progress 4gl?  I can't seem to get the syntax right.  I just want to declare an array and assign it a few initial values.  Thanks.



 

--

Jeff & Stephanie Purvis

IMPORTANT NOTICE FROM API: This communication, including any attachments, contains information that may be confidential or privileged and is intended solely for the entity or individual to whom it is addressed. If you are not the intended recipient, please contact the sender immediately and delete this message. Any unauthorized disclosure, copying or distribution of this message is strictly prohibited.

IMPORTANT NOTICE FROM API: This communication, including any attachments, contains information that may be confidential or privileged and is intended solely for the entity or individual to whom it is addressed. If you are not the intended recipient, please contact the sender immediately and delete this message. Any unauthorized disclosure, copying or distribution of this message is strictly prohibited.

IMPORTANT NOTICE FROM API: This communication, including any attachments, contains information that may be confidential or privileged and is intended solely for the entity or individual to whom it is addressed. If you are not the intended recipient, please contact the sender immediately and delete this message. Any unauthorized disclosure, copying or distribution of this message is strictly prohibited.

IMPORTANT NOTICE FROM API: This communication, including any attachments, contains information that may be confidential or privileged and is intended solely for the entity or individual to whom it is addressed. If you are not the intended recipient, please contact the sender immediately and delete this message. Any unauthorized disclosure, copying or distribution of this message is strictly prohibited.
Thanks Brenda, one last question about your code. How do you display your warning message(setMsg) to the user in the configurator? I do love your message. I may have to implement something like that in ours!

On Wed, Jul 15, 2015 at 8:55 AM, brenda mohr brenda@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>

You can get creative with it. Here is an actual example from my configurator where I am calculating the total weight of all cores on a particular quote:

Â

DEF VAR aBoxQP AS DECIMAL EXTENT 200.

DEF VAR amyWeight AS DECIMAL EXTENT 200.

DEF VAR i AS INTEGER INIT 1.   Â

Â

FOR EACH PcInValue WHERE (PcInValue.Company = (GetCurrentCompany())) AND (PcInValue.QuoteNum = setQuoteNum) no-lock.

Â

    IF (PcInValue.QuoteLine > 200) THEN DO:

         setMsg = "SERIOUSLY!??? You quoted more than 200 Boxes?? Abort, Go See Brenda".

         idiot = TRUE.

    END.

Â

    IF (NOT idiot) THEN DO:

Â

         IF (PcInValue.InputName = "decCavPP1")     THEN aBoxQP[PcInValue.QuoteLine] = integer(PcInValue.InputValue).

         IF (PcInValue.InputName = "humdecCavWt1") THEN amyWeight[PcInValue.QuoteLine] = decimal(PcInValue.InputValue).

Â

    END. /*** idiot check ***/

Â

END. /*** PcInValue ***/

Â

i = 1.

DO i = 1 TO setTotBox:

Â

    myWeight = myWeight + (amyWeight[i] * aBoxQP[i]).

Â

END.

Â

Brenda

Â

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 8:41 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Progress 4gl Array

Â

Â

Thanks!

Â

Is the only way to assign initial values like the following:

myVariable[1] = 10

myVariable[2] = 20

Â

Can I not do something like javascript: array-name = [item1, item2, ...];

Â

On Wed, Jul 15, 2015 at 8:33 AM, brenda mohr brenda@... [vantage] <vantage@yahoogroups.com> wrote:

Â

Here is a very basic example:

Â

DEF VAR myVariable AS INTEGER EXTENT 5.

DEF VAR mySum AS INTEGER INIT 0.

DEF VAR i AS INTEGER INIT 1.

Â

myVariable[1] = 10

myVariable[2] = 20

myVariable[3] = 30

myVariable[4] = 14

myVariable[5] = 15

Â

DO i = 1 TO 5:

    mySum = mySum + myVariable[i]

END.

Â

Â

Brenda

Â

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, July 15, 2015 8:14 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Progress 4gl Array

Â

Â

Can anyone tell me how to do an array in progress 4gl? I can't seem to get the syntax right. I just want to declare an array and assign it a few initial values. Thanks.



Â

--

Jeff & Stephanie Purvis

</div>
 


<div style="color:#fff;min-height:0;"></div>



--

Jeff & Stephanie Purvis