Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, August 18, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: How to insert a carriage return and/or line feed into a text string using VBScript so SLX memo shows it correctly?
Mark Mazzitello
Posts: 14
 
How to insert a carriage return and/or line feed into a text string using VBScript so SLX memo shows it correctly?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Jan 08 12:09 PM
Does anyone know how to insert a CR or LF into a text string in a VBScript (which is writing data directly to the SQL tables) so that SLX will interpret it properly in a memo control?
I put the VBScript chr(10) & chr(13) into the string, but in the SLX memo control the string data shows a thick black line in the string where the line return should be.
I do have the property "WantReturns" enabled for the memo control so users are allowed to enter returns in the text, and this does work when the text is entered through the client directly in the control. The raw SQL data shows 2 spaces in the string where the return is, but somehow SLX magically knows to make this a line return in the memo control. Inserting raw SQL data with 2 spaces shows in the memo control as 2 spaces (which I would expect).

Any ideas on how SLX reads a SQL string from the database and knows when to insert a line return?

[Reply][Quote]
Ted Sturr
Posts: 78
 
Re: How to insert a carriage return and/or line feed into a text string using VBScript so SLX memo shows it correctly?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Jan 08 12:15 PM
I believe a CRLF is CHR(13) & CHR(10) but it is even easier just use the vbCrLF.

Ted
[Reply][Quote]
Mark Mazzitello
Posts: 14
 
Re: How to insert a carriage return and/or line feed into a text string using VBScript so SLX memo shows it correctly?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Jan 08 12:25 PM
Hi Ted.

Yes I have done that and it does work to insert the CR/LF into the text string and it stores it in the SQL table, but the problem is that the SLX memo control in the client doesn't interpret it right - the memo control shows either one or two thick black vertical lines where the CR & LF should be.

I'm hoping there is some other method or some "magic" trick for either using some other VB code to insert the returns into the string in the SQL table or some way to make the SLX client memo control interpret them correctly.

Mark
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: How to insert a carriage return and/or line feed into a text string using VBScript so SLX memo shows it correctly?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Jan 08 12:25 PM
Ted's answer it spot on. I did just want to point out that you had them backwards (You want 13, then 10 - you had 10 then 13).
[Reply][Quote]
Mark Mazzitello
Posts: 14
 
Re: How to insert a carriage return and/or line feed into a text string using VBScript so SLX memo shows it correctly?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Jan 08 12:57 PM
OK - I win the "DUH!" award for today. Ryan was right, I had the line feed before the carriage return and it needs to be the other way around (13 before 10) or it doesn't work. I also learned they don't work separately; there needs to be both a CR and a LF - in that order - or neither will do what it's supposed to.

Thanks Guys!
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 8/18/2025 10:56:54 AM