Multivalue number field - Add new number last

What is the best way to solve the following:

I’m creating documents (they are invoices) from a support-issue-database. The invoice are listing the steps taken in the issue with columns like “Count”, “price” and “Total”.

Those fields are numeric fields allowing multivalue. So each item gets one line with price, count and total.

And creating those fields I’m looping each support-items steps that becomes items on the invoice.

This has been working just fine for a few month but the problems is when editing the document and saving it the decimal in “count”-column will be lost.

A lotusScript created invoice creates the following “count” filed on a invoice with 3 items all with the count “0,15”:

0,15

,15

,15

First line is showing the right zero. The second removes the 0 to ,15.

Exporting the values to EXCEL will work because it will understand that ,15 is the same as 0,15.

But when I edit the invoice and save it all fiels that are displayed as ,15 will become 15 (decimal is removed!)

Item count

0,15

,15

,15

will become:

0,15

15

15

The code that I have now looks like this:

itemCount =  Format(itemCount, "0.00")	

If invoiceDoc.HasItem("faktCount") Then

	Set oItem = invoiceDoc.GetFirstItem("faktCount")

	arrCount = oItem.Values

	Redim Preserve arrCount(Ubound(arrCount) + 1)

	arrCount(Ubound(arrCount)) = Cstr(itemCount)

	invoiceDoc.faktCount = arrCount

Else		

	Set oItem = invoiceDoc.ReplaceItemValue("faktCount", itemCount)

End If

I guess that the conversation (cstr) when adding it to the existing array is the one that causes the removal of 0 in 0,15.

Trying to add a non-stringvalue results in error.

What is the solution to my problem?

Subject: hmm

You using strings for numbers?

Is your LN field a multiple valued text or number field?

Did you check you decimal separator? , or . ?

Subject: Number

It’s a number field with “Allow multiple values”.The control tab is set to Decimal and with 2 fixed decimal places.

Previously the preference for displaying has been set to “User settings” but now Its set to Custom with a “,” as decimal symbol.