Solved

Setting a field value with lotusscript

Posted on 2000-04-13
5
2,449 Views
Last Modified: 2013-12-18
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)?





      
0
Comment
Question by:roosterup
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 2

Expert Comment

by:amit_dutta
ID: 2714897
Hi roosterup,

All u need to do is:-

Dim doc as NotesDocument
set doc = uidoc.document
doc.MyField = aDouble
doc.Save(False,True)

This should serve ur purpose.
0
 
LVL 1

Author Comment

by:roosterup
ID: 2716374
Adjusted points from 10 to 30
0
 
LVL 1

Author Comment

by:roosterup
ID: 2716375
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
status=Con.ConnectTo("","","")
Set qry.Connection = Con
Qry.SQL = "sql statement"
Set Res.Query = Qry
Res.Execute

aString=res.getvalue("I00AMM")
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?
0
 

Accepted Solution

by:
andyDale earned 30 total points
ID: 2716482
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
uidoc.refresh

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

call doc.replaceItemValue("myField",daInt)
0
 
LVL 1

Author Comment

by:roosterup
ID: 2716552
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.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question