Solved

Notes Error - Cannot locate field

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

831 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