×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Email Macro issue

Email Macro issue

Email Macro issue

(OP)
Hi

I am using Macro's to fire off emails when certain conditions arise within Problem Tickets. The issue I have is that the description field I am including in my email is drawn from a memo field (using VB terminology here) and so because the field contains carriage returns and new lines, I get certain ASCII characters in my email.

Here's my Evaluating Expression:

$L.message={"Description:"+brief.description in $L.new, "Building: "+building in $L.new, "Floor:"+floor in $L.new, "Room:"+room in $L.new, "Reported by:"+first.name.rb in $L.new+" "+last.name.rb in $L.new, "Contact Phone: "+contact.phone in $L.new, "Cost Centre: "+charge.code in $L.new, "Action:"+str(action in $L.new), "", "Email Date/Time Stamp: "+tod(), ""}


The value for action is my issue. here is the output to the email:

ServiceCenter Operator: WEATHERLEY_F

Description:Sat 23/02/02 - High temperature on Sat 23/02/02 in the above location please could     
Building: 500
Floor:GROUND
Room:23
Reported by:KAREN ROGERS
Contact Phone: +44 1234 567890

Action:{\"Sat 23/02/02 - High temperature on Sat 23/02/02 in the above location please could     \", \"you advise customer what happened?\"}

Email Date/Time Stamp: 25/02/2002 10:05:49


Does anyone know how I can strip out the following characters: { \ " }

I am using Service Center 3.0 sp5

Many thanks

birklea

birklea ~©¿©~ <><
I know what I know...don't presume that I know what I don't! Smithism!!!

RE: Email Macro issue

What I have in place is that instead of creating the message by tacking the fields together in the macro, I created a format for the email.  It's a simple format with labels I want and the fields I want in it.  Then in the macro, use

$L.message=genout($L.new, "your.email.format")

This makes the email message look like the format that you state.  I use a multitext field for my actions field and it looks fine in emails, doesn't have extra characters or anything like that.

RE: Email Macro issue

(OP)
I think I've heard about this GENOUT() function. does the format blank after every email, or is it based on a table, that stores the information?

Do you have anymore information?

Regards

birklea

birklea ~©¿©~ <><
I know what I know...don't presume that I know what I don't! Smithism!!!

RE: Email Macro issue

genout(file, format) will take relevant fields in a file variable that you feed it (in the case of a macro, $L.new) and use the format specified to come up with text.

I guess I don't understand your question.  genout does nothing to change the data save in the table, it just creates a big formatted text string.  Since you're then setting $L.message equal to its output, that will then be passed into an eventout record.

RE: Email Macro issue

I had the same 'problem'

Its fixable...

Use this in your macro:
$L.message=strrep(strrep(str(substr(str(action in $L.new), 3, val(lng(str(action in $L.new))) - 4)), "\"", ""), ",", "\0A")

Works very good.

Let me know if everything worked out good.

Bye from Germany.
Frank

RE: Email Macro issue

Sorry.. should be...

xxx in $L.message=strrep(strrep(str(substr(str(action in $L.new), 3, val(lng(str(action in $L.new)))- 4)), "\"", ""), ",", "\0A")


For xxx you have to putt YOUR current number of the array in.

Bye
frank

RE: Email Macro issue

I don't know how voted for me...
But thanks!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close