ABL Question Blank Title 103804

When you run a BPM it runs Server Side so it wont get you the client name.
However if you are in 9.05 the ttContextCallTable has that info. (I think)


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Tue, Mar 26, 2013 at 12:27 PM, tkoch77 <tkoch77@...> wrote:

> **
>
>
> Hi all,
>
> I am trying to store the computer name in a UD field when a user clocks
> in. There is a 4GL function that I was able to use successfully in the
> progress procedure editor, but in a BPM it isn't returning anything. This
> is the function I am trying to use, and it also validates with no errors.
>
> OS-GETENV("CLIENTNAME")
>
>
>


[Non-text portions of this message have been removed]
Can someone tell me how to do a loop in a BPM?

I tried this code (where i is a defined variable) but it is rejected.

for i = 1 to length (ud03.key2):



end.
Hi Carl,

All things ABL can be found here:

http://www.progress.com/progress/products/documentation/openedge/docs/dvref/dvref.pdf

Have a great weekend,

Mark

On Sat, Sep 3, 2011 at 1:21 PM, CarlH <carl.heeder@...> wrote:

> **
>
>
> Can someone tell me how to do a loop in a BPM?
>
> I tried this code (where i is a defined variable) but it is rejected.
>
> for i = 1 to length (ud03.key2):
>
> end.
>
>
>


[Non-text portions of this message have been removed]
--- In vantage@yahoogroups.com, "CarlH" <carl.heeder@...> wrote:
>
> Can someone tell me how to do a loop in a BPM?
>
> I tried this code (where i is a defined variable) but it is rejected.
>
> for i = 1 to length (ud03.key2):
>
>
>
> end.
>

DO i = 1 to length(ud03.key2):
....

END.
That did it. The Do command compiled


Thanks

[Non-text portions of this message have been removed]
Can anybody help me with the list function that will return the number of entries in a list of comma separated values?

Lookup will return the nth value in such a list, but I need to process every entry in a list.
Carl,

Below should get you started, ensure you review the 4GL handbook PDF available online.

DEF VAR vYourList as CHAR NO-UNDO.
vYourList = 'item1,item2,item3'.

DEF VAR i as INT NO-UNDO.
DO i = 1 TO NUM-ENTRIES(vYourList,','):
MESSAGE ENTRY(i,vYourList).
END.

Regards,
Stephen

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of CarlH
Sent: 02 November 2011 23:24
To: vantage@yahoogroups.com
Subject: [Vantage] ABL Question



Can anybody help me with the list function that will return the number of entries in a list of comma separated values?

Lookup will return the nth value in such a list, but I need to process every entry in a list.

Reply to sender<mailto:carl.heeder@...?subject=Re%3A%20ABL%20Question> | Reply to group<mailto:vantage@yahoogroups.com?subject=Re%3A%20ABL%20Question> | Reply via web post<http://groups.yahoo.com/group/vantage/post;_ylc=X3oDMTJwMW8xMzVzBF9TAzk3MzU5NzE0BGdycElkAzIwMzY5BGdycHNwSWQDMTcwNTAwNzE4MQRtc2dJZAMxMDUxNTIEc2VjA2Z0cgRzbGsDcnBseQRzdGltZQMxMzIwMjc2MjQ3?act=reply&messageNum=105152> | Start a New Topic<http://groups.yahoo.com/group/vantage/post;_ylc=X3oDMTJjZ3Y1cHRoBF9TAzk3MzU5NzE0BGdycElkAzIwMzY5BGdycHNwSWQDMTcwNTAwNzE4MQRzZWMDZnRyBHNsawNudHBjBHN0aW1lAzEzMjAyNzYyNDc->
Messages in this topic<http://groups.yahoo.com/group/vantage/message/103804;_ylc=X3oDMTM2NmltaDk0BF9TAzk3MzU5NzE0BGdycElkAzIwMzY5BGdycHNwSWQDMTcwNTAwNzE4MQRtc2dJZAMxMDUxNTIEc2VjA2Z0cgRzbGsDdnRwYwRzdGltZQMxMzIwMjc2MjQ3BHRwY0lkAzEwMzgwNA--> (5)
Recent Activity:


[Non-text portions of this message have been removed]
I have a question about assigning values to database fields using bpms. Is it OK to update fields without using a BO Method? I am using this code to update some fields in ProjectCst when the project is loaded into the form. Pre-processing GetByID method.


FOR EACH TTCALLCONTEXTBPMDATA.
DEFINE VARIABLE labor AS INTEGER.
DEFINE VARIABLE burden AS INTEGER.
DEFINE VARIABLE subcon AS INTEGER.
DEFINE VARIABLE mtl AS INTEGER.
DEFINE VARIABLE mtlbur AS INTEGER.
ASSIGN labor = 0.
ASSIGN burden = 0 .
ASSIGN subcon = 0.
ASSIGN mtl = 0.
ASSIGN mtlbur = 0.

FOR EACH JOBHEAD WHERE JOBHEAD.Company = CUR-COMP AND JOBHEAD.ProjectID = TTCALLCONTEXTBPMDATA.Character01.
IF AVAILABLE JOBHEAD THEN DO:

ASSIGN labor = labor + JOBHEAD.Number01.
ASSIGN burden = burden + JOBHEAD.Number02.
ASSIGN subcon = subcon + JOBHEAD.Number03.
ASSIGN mtl = mtl + JOBHEAD.Number04.
ASSIGN mtlbur = mtlbur + JOBHEAD.Number05.

END.
END.

FIND PROJECTCST WHERE PROJECTCST.Company = CUR-COMP AND PROJECTCST.ProjectID = TTCALLCONTEXTBPMDATA.Character01.
IF AVAILABLE PROJECTCST THEN DO:

ASSIGN PROJECTCST.BudTotLbrCost = labor.
ASSIGN PROJECTCST.BudTotBurCost = burden.
ASSIGN PROJECTCST.BudTotSubCost = subcon.
ASSIGN PROJECTCST.BudTotMtlCost = mtl.
ASSIGN PROJECTCST.BudTotMtlBurCost = mtlbur.

END.
END.
I think as long as you’re careful and tested and don’t modify any key fields, you’re fine. I’m sure (again) most would discourage this practice (like me using SQL triggers; ahem, Jose.... :-) ).... but if it works and if it’s 100% safe..... why not?

From: tkoch77
Sent: Thursday, March 08, 2012 11:39 AM
To: vantage@yahoogroups.com
Subject: [Vantage] ABL Question


I have a question about assigning values to database fields using bpms. Is it OK to update fields without using a BO Method? I am using this code to update some fields in ProjectCst when the project is loaded into the form. Pre-processing GetByID method.

FOR EACH TTCALLCONTEXTBPMDATA.
DEFINE VARIABLE labor AS INTEGER.
DEFINE VARIABLE burden AS INTEGER.
DEFINE VARIABLE subcon AS INTEGER.
DEFINE VARIABLE mtl AS INTEGER.
DEFINE VARIABLE mtlbur AS INTEGER.
ASSIGN labor = 0.
ASSIGN burden = 0 .
ASSIGN subcon = 0.
ASSIGN mtl = 0.
ASSIGN mtlbur = 0.

FOR EACH JOBHEAD WHERE JOBHEAD.Company = CUR-COMP AND JOBHEAD.ProjectID = TTCALLCONTEXTBPMDATA.Character01.
IF AVAILABLE JOBHEAD THEN DO:

ASSIGN labor = labor + JOBHEAD.Number01.
ASSIGN burden = burden + JOBHEAD.Number02.
ASSIGN subcon = subcon + JOBHEAD.Number03.
ASSIGN mtl = mtl + JOBHEAD.Number04.
ASSIGN mtlbur = mtlbur + JOBHEAD.Number05.

END.
END.

FIND PROJECTCST WHERE PROJECTCST.Company = CUR-COMP AND PROJECTCST.ProjectID = TTCALLCONTEXTBPMDATA.Character01.
IF AVAILABLE PROJECTCST THEN DO:

ASSIGN PROJECTCST.BudTotLbrCost = labor.
ASSIGN PROJECTCST.BudTotBurCost = burden.
ASSIGN PROJECTCST.BudTotSubCost = subcon.
ASSIGN PROJECTCST.BudTotMtlCost = mtl.
ASSIGN PROJECTCST.BudTotMtlBurCost = mtlbur.

END.
END.




No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1913 / Virus Database: 2114/4858 - Release Date: 03/08/12


[Non-text portions of this message have been removed]
I routinely override data like that, as Vic mentioned, if you perform due diligence in testing things out, avoid key fields, you should be just fine.

Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-0590
FAX: (715)284-4084
[Description: cid:1.234354861@...]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Vic Drecchio
Sent: Thursday, March 08, 2012 10:51 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] ABL Question



I think as long as you’re careful and tested and don’t modify any key fields, you’re fine. I’m sure (again) most would discourage this practice (like me using SQL triggers; ahem, Jose.... :-) ).... but if it works and if it’s 100% safe..... why not?

From: tkoch77
Sent: Thursday, March 08, 2012 11:39 AM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] ABL Question

I have a question about assigning values to database fields using bpms. Is it OK to update fields without using a BO Method? I am using this code to update some fields in ProjectCst when the project is loaded into the form. Pre-processing GetByID method.

FOR EACH TTCALLCONTEXTBPMDATA.
DEFINE VARIABLE labor AS INTEGER.
DEFINE VARIABLE burden AS INTEGER.
DEFINE VARIABLE subcon AS INTEGER.
DEFINE VARIABLE mtl AS INTEGER.
DEFINE VARIABLE mtlbur AS INTEGER.
ASSIGN labor = 0.
ASSIGN burden = 0 .
ASSIGN subcon = 0.
ASSIGN mtl = 0.
ASSIGN mtlbur = 0.

FOR EACH JOBHEAD WHERE JOBHEAD.Company = CUR-COMP AND JOBHEAD.ProjectID = TTCALLCONTEXTBPMDATA.Character01.
IF AVAILABLE JOBHEAD THEN DO:

ASSIGN labor = labor + JOBHEAD.Number01.
ASSIGN burden = burden + JOBHEAD.Number02.
ASSIGN subcon = subcon + JOBHEAD.Number03.
ASSIGN mtl = mtl + JOBHEAD.Number04.
ASSIGN mtlbur = mtlbur + JOBHEAD.Number05.

END.
END.

FIND PROJECTCST WHERE PROJECTCST.Company = CUR-COMP AND PROJECTCST.ProjectID = TTCALLCONTEXTBPMDATA.Character01.
IF AVAILABLE PROJECTCST THEN DO:

ASSIGN PROJECTCST.BudTotLbrCost = labor.
ASSIGN PROJECTCST.BudTotBurCost = burden.
ASSIGN PROJECTCST.BudTotSubCost = subcon.
ASSIGN PROJECTCST.BudTotMtlCost = mtl.
ASSIGN PROJECTCST.BudTotMtlBurCost = mtlbur.

END.
END.

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1913 / Virus Database: 2114/4858 - Release Date: 03/08/12

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



[Non-text portions of this message have been removed]
Ok thanks for the input guys. That makes sense.



________________________________
From: Rob Bucek <rbucek@...>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Thursday, March 8, 2012 12:16 PM
Subject: RE: [Vantage] ABL Question

I routinely override data like that, as Vic mentioned, if you perform due diligence in testing things out, avoid key fields, you should be just fine.

Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-0590
FAX: (715)284-4084
[Description: cid:1.234354861@...]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Vic Drecchio
Sent: Thursday, March 08, 2012 10:51 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] ABL Question



I think as long as you’re careful and tested and don’t modify any key fields, you’re fine. I’m sure (again) most would discourage this practice (like me using SQL triggers; ahem, Jose.... :-) ).... but if it works and if it’s 100% safe..... why not?

From: tkoch77
Sent: Thursday, March 08, 2012 11:39 AM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] ABL Question

I have a question about assigning values to database fields using bpms. Is it OK to update fields without using a BO Method? I am using this code to update some fields in ProjectCst when the project is loaded into the form. Pre-processing GetByID method.

FOR EACH TTCALLCONTEXTBPMDATA.
DEFINE VARIABLE labor AS INTEGER.
DEFINE VARIABLE burden AS INTEGER.
DEFINE VARIABLE subcon AS INTEGER.
DEFINE VARIABLE mtl AS INTEGER.
DEFINE VARIABLE mtlbur AS INTEGER.
ASSIGN labor = 0.
ASSIGN burden = 0 .
ASSIGN subcon = 0.
ASSIGN mtl = 0.
ASSIGN mtlbur = 0.

FOR EACH JOBHEAD WHERE JOBHEAD.Company = CUR-COMP AND JOBHEAD.ProjectID = TTCALLCONTEXTBPMDATA.Character01.
IF AVAILABLE JOBHEAD THEN DO:

ASSIGN labor = labor + JOBHEAD.Number01.
ASSIGN burden = burden + JOBHEAD.Number02.
ASSIGN subcon = subcon + JOBHEAD.Number03.
ASSIGN mtl = mtl + JOBHEAD.Number04.
ASSIGN mtlbur = mtlbur + JOBHEAD.Number05.

END.
END.

FIND PROJECTCST WHERE PROJECTCST.Company = CUR-COMP AND PROJECTCST.ProjectID = TTCALLCONTEXTBPMDATA.Character01.
IF AVAILABLE PROJECTCST THEN DO:

ASSIGN PROJECTCST.BudTotLbrCost = labor.
ASSIGN PROJECTCST.BudTotBurCost = burden.
ASSIGN PROJECTCST.BudTotSubCost = subcon.
ASSIGN PROJECTCST.BudTotMtlCost = mtl.
ASSIGN PROJECTCST.BudTotMtlBurCost = mtlbur.

END.
END.

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1913 / Virus Database: 2114/4858 - Release Date: 03/08/12

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



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



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

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/.%c2%a0
(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



[Non-text portions of this message have been removed]
I ran across some code that looks like this:

IF (condition) THEN LABEL:
DO:
<statements>.
END.


I understand the label when used in a loop where you want to skip to
the next iteration using the the NEXT statement but what does this
syntax do?

Thanks!!!

Mark W.
I believe is the same as a GOTO

If it matches X GOTO Label
contienue this otherwise.

*Jose C Gomez*
*Software Engineer*
*
*
*checkout my new blog <http://www.usdoingstuff.com> *
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*



On Thu, Jun 21, 2012 at 3:42 PM, Mark Wonsil <mark_wonsil@...> wrote:

> **
>
>
> I ran across some code that looks like this:
>
> IF (condition) THEN LABEL:
> DO:
> <statements>.
> END.
>
> I understand the label when used in a loop where you want to skip to
> the next iteration using the the NEXT statement but what does this
> syntax do?
>
> Thanks!!!
>
> Mark W.
>
>


[Non-text portions of this message have been removed]
Jose speculated:
>
> If it matches X GOTO Label
> continue this otherwise.
>

Makes sense but then there are no goto, leave, next statements
anywhere using these labels. I'm starting to think the coder was using
a label as documentation:

If (condition) then :AIR
do:

...

if (condition) then :WATER
do:
...

The label names are descriptive and never appear again in the file.
Must be a Progress coder's trick/coding style. Uses fewer characters
than /* Air */ or /* Water */

<shrug>

Thanks!

Mark W.
Hi all,

I am trying to store the computer name in a UD field when a user clocks in. There is a 4GL function that I was able to use successfully in the progress procedure editor, but in a BPM it isn't returning anything. This is the function I am trying to use, and it also validates with no errors.

OS-GETENV("CLIENTNAME")