Solved

Notes Error - Cannot locate field

Posted on 2002-03-20
6
1,684 Views
Last Modified: 2013-12-18
I am trying to pull some information via and ODBC connection.  I have the data held in a variable but when I try to Call uidoc.FieldSetText and place the data into a field I get the Cannot locate field error.  The field name is correct.  Spelling, Case and everything is fine but it won't work.  Any answers?
0
Comment
Question by:TonyBury
  • 2
  • 2
6 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6884114
It is perfectly related to typo, copy the field value from the field property box and substitute into your script.

~Hemanth
0
 
LVL 10

Accepted Solution

by:
zvonko earned 25 total points
ID: 6884164
to be able to enter Text into a NotesUIDocument field with uidoc.FieldSetText() has the field to be editable.
If it is a hidden or computed field, then create a BackEnd instace of NotesUIDocument to NotesDocument and assign the value to BackEnd. After assignment you can reload the BackEnd to UI by this call:
  Dim ws As New NotesUIWorkspace
  Dim uidoc As NotesUIDocument
  Dim doc As NotesDocument
  Set uidoc = ws.CurrentDocument
  Set doc = uidoc.Document
  doc.myFieldName = "ODBCxyz"
  Call uidoc.Reload
After this sequence does your ComputedForDisplay field named "myFieldName" contain the value "ODBCxyz" presented on UI.


0
 
LVL 24

Assisted Solution

by:HemanthaKumar
HemanthaKumar earned 25 total points
ID: 6884417
Tony,

Zvonko's response is correct in one way, but if you had a computed field and you were setting the value throug FieldSetText then you should have got the error "Notes Error - Field value cannot be edited"

So here it is the syntax issue.

I believe you have swaped the arguments, check the syntax as desribed below,
=========================================
Syntax
******
Call notesUIDocument.FieldSetText( fieldName$, textValue$ )
Parameters

fieldName$
String. The name of the field whose value you want to set. The field must be editable. Specify an empty string ("") to set the value of the current field.

textValue$
String. The value you want to give to the field. If the fieldName$ is not of type text, this value is converted from text to the appropriate data type when you save the document.

Usage
******
This method is valid only when the document is in Edit mode. To enter multiple values for a multi-value field, separate the values with the input separator as specified in the field properties.

Errors
******
If a script attempts to call FieldSetText when a document is not in Edit mode, it raises the error: "You must be in Edit mode to change the value of a field."

=========================================
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6884829
Hello Tony,

is your destination field perhaps a deleted SharedField?

And would it make easier for you and us trying to support you when we could see at least this few concerned lines from your code?

Regards,
zvonko

0
 
LVL 63

Expert Comment

by:Zvonko
ID: 10840433
TonyBury,
No comment has been added to this question in more than 757 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:

RECOMMENDATION: split points between zvonko http:#6884164 and HemanthaKumar http:#6884417

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

Zvonko
EE Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

867 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now