• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Event Rules

rwellsw

Active Member
I am new to JDE so don't be hard on me.

I am trying to create a event rule for a report that will take the social security number and have it print like xxx-xx-xxxx.

I have created the below event rule but all I get on the report is the first 3 digits. How do I get it to print all 9 digits plus put the - between the sections?

RV Variable 000021 = substr([BC Employee Tax ID (F060116)],0,3)+substr([BC Employee Tax ID (F060116)],3,2)+substr([BC Employee Tax ID (F060116)],5,4 )


Thanks
Roger
 

got_to_love_jde

Reputable Poster
roger,
have you tried creating three different variables and two constants containing '-' in between them ?
dave


NT 4.0 SP5, SQL 7.0, One World B7321 SP12.4
 

TMTruong

Member
Here is a long version,


RV Variable 000021 = concat(substr([BC Employee Tax ID (F060116)],0,3),"-")

RV Variable 000021 = concat(RV Variable 000021,substr([BC Employee Tax ID
(F060116)],3,2))

RV Variable 000021 = concat(RV Variable 000021,"-")

RV Variable 000021 = concat(RV Variable 000021,substr([BC Employee Tax ID
(F060116)],5,4 ))
 
Actually, i don't think that you can use the "+" sign to concatenate strings. You have to use the Text Function called CONCAT to merger 2 strings together.

B73.3.1, SP10, Oracle 8, NT, Citrix
 
Instead, you should use the edit feature in the data dictionary to set the
editing to include the dashes. This will cause it to display in the correct
format on all reports and windows.
 

tmesser

Member
Roger,

Don't worry, no one on this list will be hard on you.

Try setting each section in a variable, put the - in another variable and
then use the concat function to concatenate the variables together (it is in
the same list where you got the substring function).

Hope this helps,

Tom
----- Original Message -----
From: "rwellsw" <rwells@dkmail.com>
To: <jdeowdevml@jdelist.com>
Sent: Wednesday, November 22, 2000 9:53 AM
Subject: Event Rules ~~0:1568


> I am new to JDE so don't be hard on me.
>
> I am trying to create a event rule for a report that will take the social
security number and have it print like xxx-xx-xxxx.
>
> I have created the below event rule but all I get on the report is the
first 3 digits. How do I get it to print all 9 digits plus put the -
between the sections?
>
> RV Variable 000021 = substr([BC Employee Tax ID (F060116)],0,3)+substr([BC
Employee Tax ID (F060116)],3,2)+substr([BC Employee Tax ID (F060116)],5,4 )
>
>
> Thanks
> Roger
>
>
> --------------------------
> Visit the forum to view this thread at:
>
http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=&Board=OWDEV&Numbe
r=1568
> *************************************************************
> This is the JDEList One World / XE Developers Mailing List.
> Archives and information on how to SUBSCRIBE, and
> UNSUBSCRIBE can be found at http://www.JDELIST.com
> *************************************************************
>
 

SPhillips

Member
Roger,

I had to do something similar not to long ago. What I would suggest
is to assign each substring to it's own variable. Create a new variable and
use the concatenate function to tie the first variable to the '-' sign. In
7.3.2.1 you cannot concatenate more than 2 strings at a time, so you have to
assign the concatenated value more than once to get the desired result.

RV Variable 000018 = substr([BC Employee Tax ID (F060116)],0,3)
RV Variable 000019 = substr([BC Employee Tax ID (F060116)],3,2)
RV Variable 000020 = substr([BC Employee Tax ID (F060116)],5,4)
RV Variable 000021 = concat(RV Variable 000018, '-')
RV Variable 000021 = concat(RV Variable 000021, RV Variable 000019)
RV Variable 000021 = concat(RV Variable 000021, '-')
RV Variable 000021 - concat(RV Variable 000021, RV Variable 000020)

You could probably nest the substring functions in with the concat
function...worth the effort if you don't need to use the substring anywhere
else in your code.

Hope this helps.

Steve Phillips
 

Zoltan_Gyimesi

Legendary Poster
Re: RE: Event Rules

Roger,
You are welcome.

By my opinion, changing properties of an original OneWorld Datat Item in the Data Dictionary is NOT a GOOD practice. It will affect all part of OW where this Data Item is used and generally it is not desired.
Use CONCAT function as many of us suggested.
I don't think so that you have to create a lot of working variables.
Use TMTruong's long version or this one:

RV Variable 000021 =
concat
(
concat
(
concat(substr([BC Employee Tax ID (F060116)],0,3),"-"),
concat(substr([BC Employee Tax ID (F060116)],3,2),"-")
),
substr([BC Employee Tax ID (F060116)],5,4)
)

I have breaked the code to show the logic, and here is again without breaks:

RV Variable 000021 = concat(concat(concat(substr([BC Employee Tax ID (F060116)],0,3),"-"),concat(substr([BC Employee Tax ID (F060116)],3,2),"-")),substr([BC Employee Tax ID (F060116)],5,4))

At last my favorite:
"Please, place your system configuration information in your signature!"
Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 

Christian Audet

Moderator
Staff member
Hi Roger,

Like in 'C' you can't use the + sign to add string together, you need to use the
concat function. Here is your example :

RV Variable 000021 = concat(substr([BC Employee Tax ID
(F060116)],0,3),concat(substr([BC Employee Tax ID (F060116)],3,2),substr([BC
Employee Tax ID (F060116)],5,4 )))

Christian Audet





rwellsw <rwells@dkmail.com> on 11/22/2000 09:53:29 AM

Please respond to jdeowdev@jdelist.com

To: jdeowdevml@jdelist.com
cc:
Subject: Event Rules ~~0:1568



I am new to JDE so don't be hard on me.

I am trying to create a event rule for a report that will take the social
security number and have it print like xxx-xx-xxxx.

I have created the below event rule but all I get on the report is the first 3
digits. How do I get it to print all 9 digits plus put the - between the
sections?

RV Variable 000021 = substr([BC Employee Tax ID (F060116)],0,3)+substr([BC
Employee Tax ID (F060116)],3,2)+substr([BC Employee Tax ID (F060116)],5,4 )


Thanks
Roger


--------------------------
Visit the forum to view this thread at:
http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=&Board=OWDEV&Number=1568

*************************************************************
This is the JDEList One World / XE Developers Mailing List.
Archives and information on how to SUBSCRIBE, and
UNSUBSCRIBE can be found at http://www.JDELIST.com
*************************************************************







----------------------------------------------------------------
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete the material
from any computer.
 
AW: Event Rules

Hi Roger,

you must put your BC Employee Tax ID (F060116)] with an substring into three
different variables.
This likes:
´
Variable1 = substr ([BC Employee Tax ID (F060116)],0,3)
Variable2 = substr ([BC Employee Tax ID (F060116)],3,2)
Variable3 = substr ([BC Employee Tax ID (F060116)],5,4)

After you hav done this, you must fill you RV Variable 0000021. I want do this
with an concat statement like this:

RV Variable 000021 =
concat(Variable1,concat('-',concat(Variable2,concat('-',Variable3))))
And then your security number prints abaout your like.


best regards
Marcus Kerth

Pyxis Consulting Group GmbH
Am Glockenturm1
D-63814 Mainaschaff
mailto:marcus_kerth@pyxis-online.de





-----Ursprüngliche Nachricht-----
Von: rwellsw [mailto:rwells@dkmail.com]
Gesendet am: Mittwoch, 22. November 2000 15:53
An: jdeowdevml@jdelist.com
Betreff: Event Rules ~~0:1568

I am new to JDE so don't be hard on me.

I am trying to create a event rule for a report that will take the social
security number and have it print like xxx-xx-xxxx.

I have created the below event rule but all I get on the report is the first 3
digits. How do I get it to print all 9 digits plus put the - between the
sections?

RV Variable 000021 = substr([BC Employee Tax ID (F060116)],0,3)+substr([BC
Employee Tax ID (F060116)],3,2)+substr([BC Employee Tax ID (F060116)],5,4 )


Thanks
Roger


--------------------------
Visit the forum to view this thread at:
http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=&Board=OWDEV&Number=15
68
*************************************************************
This is the JDEList One World / XE Developers Mailing List.
Archives and information on how to SUBSCRIBE, and
UNSUBSCRIBE can be found at http://www.JDELIST.com
*************************************************************
 

Zoltan_Gyimesi

Legendary Poster
Re: RE: Event Rules

Roger,
Larry had written: "use the edit feature in the data dictionary".
Be careful and do not take for "edit feature" and "edit rule" in data dictionary.
"Edit Rule" is quite different thing, it is something like "validation".
I suppose, Larry had meant "Display Rule", this is the place where you can determine the display format in data dictionary.

Please, see my previous answer too and remember that I do not recommend this method changing properties in DD.

Let us know, could you resolved your problem and how.
Tahnks,

Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Top