Solved

Notes Error - Cannot locate field

Posted on 2002-03-20
6
1,709 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

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

Suggested Solutions

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

808 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