Progress trim command

I tested this and it works ... note that starting position for substring is Length(string) - 1. This returns the last two characters.

vcSample = ABCDE.

Length(vcSample) = 5, substring(vcSample, 4, 2) returns "DE". Substring(vcSample, 3, 2) returnS "CD".

Def var vOpt as char no-undo initial "ABCDE".
Def var vctemp as char no-undo.

if length(vcOpt) >= 2 then do:
vcTemp = substring(vcOpt, length(vcOpt) - 1, 2).
return "String: " + vcOpt + " last-2: " + vcTemp.
end.
else return error "Syntax: test.substring,<string to test>".
If you need it often I would make it a function ...

FUNCTION fLastN RETURNS CHARACTER (vcOpt as CHAR, n as INT):
Def var vcTemp as char no-undo.

if length(vcOpt) >= n then do:
vcTemp = substring(vcOpt, length(vcOpt) - n + 1, n).
return vcTemp.
end.
else return error "String: " + vcOpt + " is too short".

/* NOTE THAT N = 0 might also return an error, past the end of the string! */

END FUNCTION.

Then yourVar = fLastN (JobAsmbl.Partnum, 2) NO-ERROR.

Cheers!

Christopher Heins
Sr. Progress Programmer/Analyst

Desk# 973-560-5370
Cell# 908-256-3662
Skype: cheins.nj
cheins@...


NOT INTENDED AS A SUBSTITUTE FOR A WRITING
NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO, SHALL CONSTITUTE A BINDING CONTRACT, OR ANY CONTRACTUAL OBLIGATION BY PNY, OR ANY INTENT TO ENTER INTO ANY BINDING OBLIGATIONS, NOTWITHSTANDING ANY ENACTMENT OF THE UNIFORM ELECTRONIC TRANSACTIONS ACT, THE FEDERAL E-SIGN ACT, OR ANY OTHER STATE OR FEDERAL LAW OF SIMILAR SUBSTANCE OR EFFECT. THIS EMAIL MESSAGE, ITS CONTENTS AND ATTACHMENTS ARE NOT INTENDED TO REPRESENT AN OFFER OR ACCEPTANCE OF AN OFFER TO ENTER INTO A CONTRACT. NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO SHALL ALTER THIS DISCLAIMER.

This e-mail message from PNY Technologies, Inc. is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
I am trying to work out a system to allow the Accountant to tick a check box on the GLJrnlGrp which effectively prevents/allows the user to post their Journal.

Would love some ideas please.

Thank you in advance

Alison
If you can do forms customizations and BPM's it is pretty simple.
I'd use a user defined check box from the GL Journal Group table and use it on the group form. Then you could use field security to permit only members of accounting to click this box and use a simple BPM to block the Business Object GLJrnGrp Method PostGroupJournals if the check box isn't checked.


Write to me if you need more help with this.

--- In vantage@yahoogroups.com, "alison.kruger" <alison@...> wrote:
>
> I am trying to work out a system to allow the Accountant to tick a check box on the GLJrnlGrp which effectively prevents/allows the user to post their Journal.
>
> Would love some ideas please.
>
> Thank you in advance
>
> Alison
>
Hi Carl

Great idea - only issue I have now is I can see the Business Object for
controlling the post synchronously but not asynchronously - any ideas?

Regards

Alison





From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
CarlH
Sent: Monday, 7 November 2011 7:38 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Ideas on How to Allow an Accountant to Authorise
Journals Before Posting






If you can do forms customizations and BPM's it is pretty simple.
I'd use a user defined check box from the GL Journal Group table and use it
on the group form. Then you could use field security to permit only members
of accounting to click this box and use a simple BPM to block the Business
Object GLJrnGrp Method PostGroupJournals if the check box isn't checked.

Write to me if you need more help with this.

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
"alison.kruger" <alison@...> wrote:
>
> I am trying to work out a system to allow the Accountant to tick a check
box on the GLJrnlGrp which effectively prevents/allows the user to post
their Journal.
>
> Would love some ideas please.
>
> Thank you in advance
>
> Alison
>





[Non-text portions of this message have been removed]
I am starting to see this more and more due to SOX requirements. I added
a checkbox and character fields to the form. I used the group update BPM
to populate (or depopulate) the Character with the User name who
approved the group. I used a new security group (I called GL Approver)
and BPM to control who was allowed to check the box and then in the
check before post BPM, I checked to make sure the checkbox was checked.



Between the custom form, the BPMs and the added security group, it took
a short time to do and it satisfies the auditors because I capture the
approver.



Charlie Smith

2W Technologies LLC, Sr. Business Consultant



Phone: (312) 533-4033 x8046

(860) 620-9553

Fax: (847) 374-3620

2W Tech on Facebook
<http://www.facebook.com/pages/Chicago-IL/2W-Technologies-LLC/1391945694
32409> www.2WTech.com <http://www.2wtech.com/>



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of alison.kruger
Sent: Sunday, November 06, 2011 1:49 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Ideas on How to Allow an Accountant to Authorise
Journals Before Posting





I am trying to work out a system to allow the Accountant to tick a check
box on the GLJrnlGrp which effectively prevents/allows the user to post
their Journal.

Would love some ideas please.

Thank you in advance

Alison





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

May I ask what Methods you put your BPM against - as I can find one to
control the post synchronously but NOT asynchronously?

Regards

Alison



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
CharlieSmith
Sent: Monday, 7 November 2011 8:58 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Ideas on How to Allow an Accountant to Authorise
Journals Before Posting





I am starting to see this more and more due to SOX requirements. I added
a checkbox and character fields to the form. I used the group update BPM
to populate (or depopulate) the Character with the User name who
approved the group. I used a new security group (I called GL Approver)
and BPM to control who was allowed to check the box and then in the
check before post BPM, I checked to make sure the checkbox was checked.

Between the custom form, the BPMs and the added security group, it took
a short time to do and it satisfies the auditors because I capture the
approver.

Charlie Smith

2W Technologies LLC, Sr. Business Consultant

Phone: (312) 533-4033 x8046

(860) 620-9553

Fax: (847) 374-3620

2W Tech on Facebook
<http://www.facebook.com/pages/Chicago-IL/2W-Technologies-LLC/1391945694
32409> www.2WTech.com <http://www.2wtech.com/>

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of alison.kruger
Sent: Sunday, November 06, 2011 1:49 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Ideas on How to Allow an Accountant to Authorise
Journals Before Posting

I am trying to work out a system to allow the Accountant to tick a check
box on the GLJrnlGrp which effectively prevents/allows the user to post
their Journal.

Would love some ideas please.

Thank you in advance

Alison

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





[Non-text portions of this message have been removed]
Use the checkbeforepost method.



Charlie Smith

2W Technologies LLC, Sr. Business Consultant



Phone: (312) 533-4033 x8046

(860) 620-9553

Fax: (847) 374-3620

2W Tech on Facebook
<http://www.facebook.com/pages/Chicago-IL/2W-Technologies-LLC/1391945694
32409> www.2WTech.com <http://www.2wtech.com/>



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Alison Kruger
Sent: Sunday, November 06, 2011 6:26 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Ideas on How to Allow an Accountant to Authorise
Journals Before Posting





Hi Charlie

May I ask what Methods you put your BPM against - as I can find one to
control the post synchronously but NOT asynchronously?

Regards

Alison

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf Of
CharlieSmith
Sent: Monday, 7 November 2011 8:58 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Ideas on How to Allow an Accountant to Authorise
Journals Before Posting

I am starting to see this more and more due to SOX requirements. I added
a checkbox and character fields to the form. I used the group update BPM
to populate (or depopulate) the Character with the User name who
approved the group. I used a new security group (I called GL Approver)
and BPM to control who was allowed to check the box and then in the
check before post BPM, I checked to make sure the checkbox was checked.

Between the custom form, the BPMs and the added security group, it took
a short time to do and it satisfies the auditors because I capture the
approver.

Charlie Smith

2W Technologies LLC, Sr. Business Consultant

Phone: (312) 533-4033 x8046

(860) 620-9553

Fax: (847) 374-3620

2W Tech on Facebook
<http://www.facebook.com/pages/Chicago-IL/2W-Technologies-LLC/1391945694
32409> www.2WTech.com <http://www.2wtech.com/>

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <
mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ] On
Behalf
Of alison.kruger
Sent: Sunday, November 06, 2011 1:49 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <
mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Ideas on How to Allow an Accountant to Authorise
Journals Before Posting

I am trying to work out a system to allow the Accountant to tick a check
box on the GLJrnlGrp which effectively prevents/allows the user to post
their Journal.

Would love some ideas please.

Thank you in advance

Alison

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

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





[Non-text portions of this message have been removed]
Hoping someone could help.



I have a database field "jobasmbl.partnum" which can vary in length

I need a trim formula or something simular to only show the last 2
characters



Eg.

BS2500x8000x12 - to show 12

BS2500x8000x16 - to show 16



Using the formula in report builder





Best regards,

Mark Howard
Jaws Support

P

+61 7 3277 7499

D

+61 7 3277 7499

F

+61 7 3875 1887

M



E

mhoward@... <mailto:mhoward@...>

W

www.jaws.com.au <http://www.jaws.com.au>


<http://www.jaws.com.au>

Disclaimer:
This document (and any accompanying file attachments) is intended solely
for the use of the individual or entity to which it is addressed and
contains information that is personal, privileged, confidential or
exempt from disclosure. Any dissemination, or copying of this document
to anyone but the intended recipient is strictly prohibited. If you have
received this document in error, please notify the sender immediately by
email and destroy any copies of the message (including any accompanying
file attachments). Furthermore, we accept no responsibility for the
content of any email which is sent by an employee that is of a personal
nature. Thank you.





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

Since your partnum is of variable length, you’ll need to use a combination of the SubString() function and the Length() function.

SUBSTRING (source , position [ , length [ , type ] ] )
LENGTH ( { string [ type ] | raw-expression } )

Something like this:

SubString(JobAsmbl.PartNum, Length(JobAsmbl.PartNum)-2, 2)




.


From: Mark Howard
Sent: Monday, November 07, 2011 1:18 AM
To: vantage@yahoogroups.com
Subject: [Vantage] progress trim command


Hoping someone could help.

I have a database field "jobasmbl.partnum" which can vary in length

I need a trim formula or something simular to only show the last 2
characters

Eg.

BS2500x8000x12 - to show 12

BS2500x8000x16 - to show 16

Using the formula in report builder

Best regards,

Mark Howard
Jaws Support

P

+61 7 3277 7499

D

+61 7 3277 7499

F

+61 7 3875 1887

M

E

mailto:mhoward%40jaws.com.au <mailto:mailto:mhoward%40jaws.com.au>

W

www.jaws.com.au <http://www.jaws.com.au>

<http://www.jaws.com.au>

Disclaimer:
This document (and any accompanying file attachments) is intended solely
for the use of the individual or entity to which it is addressed and
contains information that is personal, privileged, confidential or
exempt from disclosure. Any dissemination, or copying of this document
to anyone but the intended recipient is strictly prohibited. If you have
received this document in error, please notify the sender immediately by
email and destroy any copies of the message (including any accompanying
file attachments). Furthermore, we accept no responsibility for the
content of any email which is sent by an employee that is of a personal
nature. Thank you.

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




No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1869 / Virus Database: 2092/4601 - Release Date: 11/06/11


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