Solved

Notes Error - Cannot locate field

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

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.
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

757 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

16 Experts available now in Live!

Get 1:1 Help Now