Solved

Notes Error - Cannot locate field

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
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.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

713 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