Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, August 27, 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: Find replace, String manipulation strreplace? substring? chop truncate ??
Brian Kempe
Posts: 53
 
Find replace, String manipulation strreplace? substring? chop truncate ??Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Nov 06 1:06 PM
fiogf49gjkf0d
Hi I feel really dense for asking , because Im sure that this is 101 but,
How do I convert a string with "fgfdgdf-lklkllklkk" to "lklklklklkkk"
Like find position of "-" in string then chop from that position to the left.

Thanks :D
[Reply][Quote]
Frank Chaffin
Posts: 475
 
Re: Find replace, String manipulation strreplace? substring? chop truncate ??Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Nov 06 3:11 PM
fiogf49gjkf0d
The SalesLogix scripting environement is MS VB Script compatible, so ou can use VB Scripts string function like

Len(string)

InStr([start, ]string1, string2[, compare])

Right(string, length)
Left(string, length)
Mid(string, start[, length])

Here is a pointer to an online refernece manual
http://msdn2.microsoft.com/en-us/library/3ca8tfek.aspx

[Reply][Quote]
Brian Kempe
Posts: 53
 
Re: Find replace, String manipulation strreplace? substring? chop truncate ??Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Nov 06 4:00 PM
fiogf49gjkf0d
Thank you
[Reply][Quote]
Phil
Posts: 2
 
Re: Find replace, String manipulation strreplace? substring? chop truncate ??Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Nov 08 9:46 AM
' Remove any apostrophes!!!!!
'
For i = 1 To Len(strNotes)
If Mid(strNotes,i,1) = "'" Then
strNotes = Left(strNotes,i - 1) & " " & Right(strNotes,Len(strNotes)-i)
End If
Next

Every now and then you hit a wall with SalesLogix. Why isn't there a Replace function or am I missing something!!!!

We do a lot of custom data injections into SQL so this would come in handy.

Phil..
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Find replace, String manipulation strreplace? substring? chop truncate ??Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Nov 08 9:04 PM
Yuk, no need for that!!

Dim strA, strB

strA = "'sdjh'segh;dfsd'dfgdfgdfg'dfggdg'"
strB = Replace(strA,"'"," ")

MsgBox strA & vbCrLf & strB
[Reply][Quote]
Phil
Posts: 2
 
Re: Find replace, String manipulation strreplace? substring? chop truncate ??Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Nov 08 3:41 AM
Not on our version (5.0.0.1545) Obviously Replace was the first thing I tried but Compile Error 'Sub or Function not defined'

I know we're running a very old version but it works and we always find away around any coding issues. When you spend the rest of your time in C# and Visual Studio 2008 a bit of SalesLogix pain is fun.



Phil.. (AKA GetThemAll if you play COD4)
[Reply][Quote]
Jeff Weight
Posts: 219
 
Re: Find replace, String manipulation strreplace? substring? chop truncate ??Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Nov 08 11:40 AM
Wow. Very old is an understatement. Going back to version 5.2 and below feels like crawling around in the crawl-space under a house for me.
[Reply][Quote]
Dan Carvin
Posts: 227
 
Re: Find replace, String manipulation strreplace? substring? chop truncate ??Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Nov 08 4:35 PM
The version of Basic used in SLX 5 and before (referred to "Legacy" in version 6 and above) is called "Cypress Enable."

There should be a PDF file in the SLX documentation called SalesLoxix2000 Developer Resource or lan_dev_ref_v5 that contains the documentation you need to develop in this environment.
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: Find replace, String manipulation strreplace? substring? chop truncate ??Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Nov 08 10:04 AM
Quote:
Originally posted by Phil

Not on our version (5.0.0.1545) Obviously Replace was the first thing I tried but Compile Error 'Sub or Function not defined'

I know we're running a very old version but it works and we always find away around any coding issues. When you spend the rest of your time in C# and Visual Studio 2008 a bit of SalesLogix pain is fun.



Phil.. (AKA GetThemAll if you play COD4)



Here's a "replace" function for Cypress Enable:
Quote:

' HowTo - Function to Replace Strings in Strings with Strings
' From TheToolBoxX of rjlSystems

'
' Replace Function - Does Not exist in Slx V5.
'
' Usage:
' sStrippedPhone = Replace(sPhone2 , "-", "")
' sSQL = Replace(sSQL, "'", "''")
'
Function Replace(sStringVal As String, sReplaceStr As String, sNewStr As String) As String
Dim iPos As Integer
iPos = 1
Do
If iPos = 0 Then Exit Do
iPos = InStr(iPos, sStringVal, sReplaceStr)
If iPos > 0 Then
sStringVal = Left(sStringVal, iPos - 1) & sNewStr & Right(sStringVal, Len(sStringVal) - (iPos + (Len(sReplaceStr) - 1)))
iPos = iPos + Len(sNewStr)
End If
Loop
Replace = sStringVal
End Function

--
RJLedger - www.SlxWizard.com
rjlSystems - A SalesLogix BP
[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/27/2025 8:59:05 AM