This content has been marked as final. Show 9 replies
1) Use SQL to get sub string - leverage your SQL DB and send it the string and have it break it up for you SUBSTRING ( expression ,start , length )
2) Use undocumenetd campaign function:
x = 0, y = 2 !GetSubString($VAR,0,3) = 10
x = 2, y = 2 !GetSubString($VAR,1,2) = 12
Thank you, this is what I was looking for.
What would you recomend I do if user enters a date such as 312 (march 2012), and I only want 3 in the first variable and 12 in second?
Is there a get variable length function in CCA? Maybe after I get user input values, I can check for the length, if it is 3 , then I do a substring of 0,1 and another of 2,2 for else if length is 4, I do the 0,2 and 2,2 instead?
!GetStringLength($VAR) = 10
Its funny how CCA ignores a leading 0 in the get !GetStringLength($VAR) function. If I input 0412 for april of 2012 as the date, it says the length is 3 even though I entered 4 digits, would that be a bug with them or is there a way to specify not to ignore the leading 0.
This is why my first suggestion was to use SQL for string functions.
You may want to open an SR and see what support says.
did you get the SPROC working?
Yes, the SPOC is workiing now, testing with direct sending of data works fine, but when getting the data from user is what I'm now working on.
We're getting a 4 digit date which is the one I need to send as substrigs of a variable. Unfortunatelly, CCA only gets 3 digits if the leading number is a 0, I will try go get the legnth of the variable which will be 3 even if the number entered is 0212, and if its 3, I'll get substring 2 and 12 and then add a leading zero to the first.
Cool, glad it is working with this small change.
Please mark the threads as answered.