8/27/2025 2:27:42 PM
|
|
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!
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.
|
|
|
| |
| |
| |
|
Re: Find replace, String manipulation strreplace? substring? chop truncate ??
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.. |
|
|
| |
|
Re: Find replace, String manipulation strreplace? substring? chop truncate ??
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) |
|
|
| |
|
Re: Find replace, String manipulation strreplace? substring? chop truncate ??
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. |
|
|
|
Re: Find replace, String manipulation strreplace? substring? chop truncate ??
Posted: 15 Nov 08 10:04 AM
|
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:
' 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 |
|
|
|
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!
|
|
|
|
|
|
|
|