Ok here is a formula that will get the first strings before the first comma.
I assume you want the values between the commas.
Code:
'This formula uses Basic syntax
dim StringInput as string
dim Character as string
dim NumberOfCharacters as number
'The StringInput, Character and NumberOfCharacters
'variables can be changed to your values
StringInput = {@Number}
Character = ","
NumberOfCharacters = 0
'NumberOfCharacters specifies that the token returned
'If the token to be retrieved comes before the first
'occurrence of Character, use 0 for NumberOfCharacters.
dim Token as number
dim Increment as number
dim Output as string
dim Ender as number
Ender = NumberOfCharacters + 1
do until Token = Ender or Increment = length(StringInput)
Increment = Increment + 1
if StringInput(Increment) = Character then Token= Token + 1
if Ender - Token = 1 and StringInput(Increment) <> Character then Output = Output + StringInput(Increment)
loop
Formula = Output
If you could have up to 10 lines then you will have 10 formulas the way I show, just change the variable at NumberOfCharacters. 1st formula has a 0, 2nd would have a 1 and up to 9 for 10 lines.
Hope that makes sense, someone else might have an easier way of doing this.
Look at the help for the Split function, and on arrays.
e.g.
stringvar array parts := split({table.field}); //or maybe numbervar, if all your parts are numbers
Ok here is a formula that will get the first strings before the first comma.
I assume you want the values between the commas.
Code:
'This formula uses Basic syntax
dim StringInput as string
dim Character as string
dim NumberOfCharacters as number
'The StringInput, Character and NumberOfCharacters
'variables can be changed to your values
StringInput = {@Number}
Character = ","
NumberOfCharacters = 0
'NumberOfCharacters specifies that the token returned
'If the token to be retrieved comes before the first
'occurrence of Character, use 0 for NumberOfCharacters.
dim Token as number
dim Increment as number
dim Output as string
dim Ender as number
Ender = NumberOfCharacters + 1
do until Token = Ender or Increment = length(StringInput)
Increment = Increment + 1
if StringInput(Increment) = Character then Token= Token + 1
if Ender - Token = 1 and StringInput(Increment) <> Character then Output = Output + StringInput(Increment)
loop
Formula = Output
If you could have up to 10 lines then you will have 10 formulas the way I show, just change the variable at NumberOfCharacters. 1st formula has a 0, 2nd would have a 1 and up to 9 for 10 lines.
Hope that makes sense, someone else might have an easier way of doing this.
GJ
ok. how can I dynamically increase the "NumberOfCharacters" after everytime a record is read and then have it display it on the detail line?
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.