AZdesertdog
IS-IT--Management
Using CE10/CR10 against MSSQL db.
Have a report that has an NT error log memofield.
Memofield example:
User Logoff:^` User Name: SAYSQL$^` Domain: METRO^` Logon ID: (0x0 0xA7928C)^` Logon Type: 3^`
I want to be able to search against the various segments of this field so I have parsed it out into 8 fields using formulas:
@Split1
ltrim(Split({events.messagebody}, "^`")[1])
@Split2
ltrim(Split({events.messagebody}, "^`")[2])
@Split3
ltrim(Split({events.messagebody}, "^`")[3]) etc.. to [8]
I've found that the number of parts of the memo can be up to 8 so I have 8 seperate formulas for parsing. What is happening is when the memo field has less than 8, I get the error message:
"a subscript must be between 1 and the size of the array"
I think I need to use ubound to evaluate the number of elements in the array but haven't been able to get the syntax right- if that's the solution. Any help appreciated. Thanks!
Have a report that has an NT error log memofield.
Memofield example:
User Logoff:^` User Name: SAYSQL$^` Domain: METRO^` Logon ID: (0x0 0xA7928C)^` Logon Type: 3^`
I want to be able to search against the various segments of this field so I have parsed it out into 8 fields using formulas:
@Split1
ltrim(Split({events.messagebody}, "^`")[1])
@Split2
ltrim(Split({events.messagebody}, "^`")[2])
@Split3
ltrim(Split({events.messagebody}, "^`")[3]) etc.. to [8]
I've found that the number of parts of the memo can be up to 8 so I have 8 seperate formulas for parsing. What is happening is when the memo field has less than 8, I get the error message:
"a subscript must be between 1 and the size of the array"
I think I need to use ubound to evaluate the number of elements in the array but haven't been able to get the syntax right- if that's the solution. Any help appreciated. Thanks!