0
votes

In Lotusscript I have this:

Dim PurchaseValue As Double
PurchaseValue = CDbl (docOrder.InkoopKeerAantal(0))

On the form InkoopKeerAantal is a Number.

I get the error:

Type mismatch in method CoerStrToNum: STRING found, Double Expected.

If I do CInt then I get String found Short expected...

And PurchaseValue = docOrder.InkoopKeerAantal(0)

Also gives me the same error as above.

2
please paste a screenshot of the document properties with Item InkoopKeerAantal selected in the item list... - Torsten Link
@TorstenLink Uploaded it - YdB
ok. Please try: Msgbox TypeName( docOrder.InkoopKeerAantal(0) ) and Msgbox TypeName( docOrder.GetitemValue( "InkoopKeerAantal" )(0) ) and Msgbox Cstr( docOrder.InkoopKeerAantal(0) ) - Torsten Link
I get Unexpected: TypeName: Expected: ( - YdB
Then you did something wrong, just tried: Msgbox TypeName( docOrder.InkoopKeerAantal(0) ) works here without a problem. What version of Notes do you have? Please post the complete code, probably something else is wrong in the context. What does the debugger show you as item value for InkoopKeerAantal? - Torsten Link

2 Answers

0
votes

PurchaseValue = docOrder.getItemValue("InkoopKeerAantal")(0) might do it.

0
votes

My reference was to a wrong document.. Thanks everyone and sorry of this mistake