Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4110 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

We have a function that takes multiple script parameters in order to send an email.

 

(we do this because we need to check for a maintenance variable which governs who gets the email)

 

I am sending parameters as newlines and using (Get(ScriptParameter);1) to retrieve them.

 

Works great unless a parameter as a newline, like the body of an email does quite often.

 

I can use Quote(text) to get it into the function properly but once its there I cant unescape the newlines to get them into the email properly.

 

Does anyone have a tip on how to either pass parameters that accept newlines or to undo Quote once it arrives (just for newlines if thats easier).

 

I tried Substitute(text) without any luck.

 

Tx!

John-

Posted

Get(ScriptParameter) does not allow breaking down the parameter; it collects the entire parameter that was passed.  You must parse it after you retrieve it:

 

Set Variable[$ScrptParam; Get(ScriptParameter)]  // the quote function is not necessary!

Set Variable[$FirstParam; GetValue($ScrptParam; 1)]  //  first line in parameter

//etc

 

I'm not clear about what the newlines in the parameter are doing in the script, so if the above doesn't work, give us a more detailed description of what you are trying to accomplish.

Posted

Is there a reason why you can't start your script by loading each value into its own individual variable? That would not only eliminate the need for parsing, but also retain the values' data types (not to mention the added clarity by having a meaningful name for each value).

 

 

 

 

I tried Substitute(text) without any luck.

 

Well, if the script parameter is =

Substitute ( text ; ¶ ; "§" )

then =

Substitute ( Get (ScriptParameter) ; "§" ; ¶ )

will retrieve the original text.

Posted

I agree with Mr. Bante, name/value pairs are where it's at. I use a somewhat simpler routine that consists of only one custom function to parse out the parameter -- I don't use a function to send the parameter.

 

Mr. Comment, good to see you again!

This topic is 4110 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.