Multi Text List vs Text String

Morning everyone,

I’m slowly learning LS and have been working on a database template from the internet. It checks the server logs and highlights any problems. I’m also wanting the db to check for logs on our main CRM application. I’m 99% there but I’ve come across a problem which my lack of LS knowledge is holding me back on.

When I run the script, it checks the server log entries okay because the data is in a multi text field, but the logs for my CRM app are only a single text string entry.

This is the script I’m using, can anyone tell me what might be the problem.

If sdoc.LogType(0) = "ALog" Then

	Forall itms In mdoc.A~$ACTION

		strIndex = strIndex + 1

		Call WriteLogLine(itms)

		arrLSArray(Ubound(arrLSArray)) = itms

		Redim Preserve arrLSArray(Ubound(arrLSArray)+1)

	End Forall

End If

I’m not entirely sure how to alter this part of the Script to only use a text field. Any help would be great.

Thanks, Paul

Subject: Multi Text List vs Text String

PV,

There are two (at least) ways of doing this. One, is to set your text box field to allow multiple values and then set it to the “newline” when separating the values when you access your dynamic array (see the text box properties). The second, is to add (Chr(10) + Chr(13)) to your array list. This will give the appearance of separate values when viewing them from the UI, but when looking at the field value itself, it will be one long string. Also, remember the “K” limit of how much you can put in a text field (I believe 32K is the max).

HTH,

SPJ