AnsweredAssumed Answered

Unwanted carriage returns in Run Script on Server email body

Question asked by mcarey on Jan 28, 2015
Latest reply on Jan 28, 2015 by mcarey

I have a FileMaker Pro 13 work flow solution runing on FileMaker Pro 13 Server, where a user denies a request by clicking on a deny button from their FileMaker Pro client window layout.

 

The script attached to the button has the script step: Run Script on Server with the following script parameter:

List (

Approving_User::userEmail_c;

User::userEmail_c;

User::userNameFull_fl_c;

Get ( AccountName );

milRpt::zkp_mr_ID;

milRpt::mr_denialReason

)

 

\\Note: the fields in the list are all accessible from the layout where the user clicks on the Deny button

 

The Script defined in the RUN Script on Server script includes 6 set variable steps and one SendMail step:

Set Variable.... variable Options: Name: $$denyEmailToUserCCApprover Value: MiddleValues ( Get ( ScriptParameter ); 1; 1)

Set Variable.... variable Options: Name: $$denyEmailToClaimant Value: MiddleValues ( Get ( ScriptParameter ); 2; 1)

Set Variable.... variable Options: Name: $$denyClaimantName Value: MiddleValues ( Get ( ScriptParameter ); 3; 1)

Set Variable.... etc

Set Variable....

Set Variable....

SendMail


Send mail options:

To: $$denyEmailToClaimant

---

---

MESSAGE:

$$denyClaimantName &  "'s Mileage Report ID#" & $$ID & " has been DENIED by the Accounts Payable Dept and returned to Stage-1. The Claimant will have to re-submit or delete this mileage report. " & "¶¶"  & "----------------------------------" & "¶" &

"AP staff member, " & $$staffName & ", has given the following denial reason: " & "¶¶"  &

$$denyReason & "¶¶" &

"----------------------------------" & "¶¶" &

"Please contact your Accounts Payable Department if you have any questions."

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

The email is sent from the server and the parameters passed and set in the variables but the email sent out has a carriage return after every variable.  Here is what an email body looks like:

 

David Samuelson

's Mileage Report ID#100

has been DENIED by the Accounts Payable Dept and returned to Stage-1. The Claimant will have to re-submit or delete this mileage report.

 

 

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

AP staff member, maccarey

, has given the following denial reason:

 

 

The only way we reimburse for trips to Disneyland is when the claimant brings us Mickey Mouse ears.

 

 

 

 

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

 

 

Please contact your Accounts Payable Department if you have any questions.

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

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

How do I get rid of those extra carriage returns that seem to appear after every $$variable?

 

Thanks for your help

Outcomes