Strange Trouble Pulling computed field data from a document for an export routine in LS

This seems strange, I’ve done many changes in the code and tried different functions, but it still comes out this way.

I have a computed field in a document that calculates cost/pound. The result in the document works fine and gives a result or .01. The properties for this field in the saved document is:

Field Name: PerPound

Data Type: Number List

Data Length: 12 bytes

Seq Num: 8

Dup Item ID: 0

Field Flags: SUMMARY

0.00906976744186

The problem is that when I call it into an export routine, the value changes to 9.06.

The LS I am using is simply:

costperpound$ = Cstr(doc.PerPound(0))

I’ve tried removing the Cstr:

costperpound$ = doc.PerPound

with same result.

Very strange is that other documents work just fine.

This is the results from a second document in the export range:

Field Name: PerPound_1

Data Type: Number List

Data Length: 12 bytes

Seq Num: 6

Dup Item ID: 0

Field Flags: SUMMARY

3.23565573770492

when run through the same function: it comes back with 3.2356…

costperpound1$ = Cstr(doc.PerPound_1(0))

Can anyone tell me why one works and the other doesn’t?

This messes up the export to an invoice, so it shows 9.20/lb instead of .01/lb.

Thanks in advance,

Bob

Subject: Strange Trouble Pulling computed field data from a document for an export routine in LS

What do you get if you try:costperpound$ = Format(doc.PerPound(0),“0.00”)

Subject: Solved! Strange Trouble Pulling computed field data from a document for an export routine in LS

That did the trick,I had looked at Format, too for another field, but it didn’t click for this one.

I changed them and watched as the debugger showed me the values.

I know this was simple, but I really try to get my own answers by searching this forum, the web, and other programs I have to modify (which is what I do mainly, change someone else’s undocumented code.

Thanks again

Bob