荷花笔记6.5我设置了一些数字字段,以仅在逗号后显示2个数字(例如2,25),但有时完整数字用于表示。2,25387。如何通过Lotus Notes脚本检查数字的小数位数?之后,如何提取特定位置或范围内的数字?
例如:
in the field i see: 2,25
the whole number is: 2,25387
using lotus notes script want to extract third and fourth number after comma, in this case 38.
我怎样才能做到这一点 ?
只需使用getitemvalue ...
Dim doc as NotesDocument
Dim dblNumber as Double
Set doc = .... '- Somehow get the document
dblNumber = doc.GetItemValue( "NameOfNumericField" )(0)
获取文档:
在运行于选定文档上的代理中:
Dim ses as New NotesSession
Dim db as NotesDatabase
Dim dc as NotesDocumentCollection
Dim doc as NotesDocument
Set db = ses.CurrentDatabase
Set dc = db.UnprocessedDocuments
Set doc = dc.GetFirstDocument
在从打开的文档调用的按钮中:
Dim ws as New NotesUIWorkspace
Set doc = ws.CurrentDocument.Document
在dblValue中,您有完整的数字。使用基本数学来获取逗号后的第三和第四位数字。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句