Multi value field is not retaining blank values

I am opening a new document using Lotusscript (workspace.EditDocument(True, Doc)) in which I prepopulate a multi-value text field on the document. An example of the data with 5 elements: “Value 1”, “”, “Value 3”, “”, “Value 5”

After the document is opened and I reference the field on the document in another script using workspace.CurrentDocument.Document, I do not have the blank values. All I have is a field with 3 elements: “Value 1”, “Value 3”, “Value 5” and I need to retain the blank values.

There are no formulas to trim the blank values in the events nor is there a full trim on the field in script. Any ideas why this would happen?

Subject: RE: Multi value field is not retaining blank values.

When data is processed on a Notes input form, blank values are automatically trimmed from multivalue fields that appear on the form.

To retain blank elements in a field, you need to take it off the form. You can assign a field with any legal name using LotusScript or macro language, even if it’s not on the form. Formulas of other fields can also refer to it.

Alternately, if you can have the source of the data be some other field, then a computed field will keep whatever value you compute for it even if it does contain blank elements.

Subject: Multi value field is not retaining blank values.

What does the field use for a separator? If you’re using NewLine AND Blank Line for “separate when” and New Line for “display using”, guess what?

Subject: RE: Multi value field is not retaining blank values.

Thanks for the idea. It is setup with the defaults, comma and semi colon. Changing this doesn’t seem to affect the outcome.

Subject: Multi value field is not retaining blank values.

This is a Notes quirk. To get what you want use:

VariantVar = Split(workspace.CurrentDocument(FieldGetText(“fieldname”) , "; " )

Make sure that the display separator of the field matches the delimiter used in the Split function. Add a space, as Notes does (“; “ or “, “).

If your values contain semicolons or commas, then you’ll need to create a small function incorporating the Split while handling the existing semicolons or commas.