Setting a field value with lotusscript

I can set the value of a text field to any string using "FieldSetText". How do i set the value of a numeric field?

I have a variable, type double, i want to set a field equal to this.

Dim aDouble As Double
aDouble = 1
Call uidoc.FieldSetText("MyField", aDouble)?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi roosterup,

All u need to do is:-

Dim doc as NotesDocument
set doc = uidoc.document
doc.MyField = aDouble

This should serve ur purpose.
roosterupAuthor Commented:
Adjusted points from 10 to 30
roosterupAuthor Commented:
Dim aString As String
Dim aDouble As Double
Dim con As New ODBCConnection
Dim qry As New ODBCQuery
Dim res As New ODBCResultSet
Dim WS As New notesUIWorkspace
Dim uidoc As NotesUiDocument
Set uidoc = ws.currentdocument
Set qry.Connection = Con
Qry.SQL = "sql statement"
Set Res.Query = Qry

Call uidoc.FieldSetText("month"aString)

I have to set aString to a number so a data conversion takes place, then use fieldsettext to get the text into the field. how can i just set a field equal to an integer value?

res.getvalue("I00AMM") is an int, how do i set a number field to this value?
I am wandering why you regected the privious answer, it is the way to do it. You'll need to set the value throught the back-end, the front-end only has text methods. I would agree that the .save is overkill as a simple uidoc.refresh would bring your backend change into the UI without having to save the document:

Dim doc as NotesDocument
set doc = uidoc.document
doc.MyField = daInt

if you don't like the abrieviated field assignment method try

call doc.replaceItemValue("myField",daInt)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
roosterupAuthor Commented:
This works, but i don't understand why some of the other fields I have assigned a text value using Call uidoc.FieldSetText will have thier values erased.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.