[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How can i get the value of lotus notes field corresponding to sub form

Posted on 2014-09-01
6
Medium Priority
?
279 Views
Last Modified: 2014-09-02
I have an nsf file  from which i would like to export the information corresponding to a field.

The problem is that i can't see the field on the NotesDocument even when i am retrieving it directly from database by Id.

I guess is because is defined in a subform.

I am not familiar with lotus so please help me to find the right code or give me some advice on how i should approach the problem.
0
Comment
Question by:Nordicit
  • 3
  • 3
6 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 40297383
Sorry, I don't understand how you intend to attack this problem. What applications or tools do you have or use? There are all sorts of more or less relevant Notes elements in your question, but I fail to see the bigger picture. You say you have an nsf file, but do you have Notes? What is "retrieve by ID"? How do you try to "see" a field in a NotesDocument? What do you use to get this NotesDocument in the first place? What does the subform have to do with it?

Could you give us more information, e.g. what is the development environment that you use to tackle this problem, and what exactly do you want to accomplish?
0
 

Author Comment

by:Nordicit
ID: 40297722
I use Lotus Notes, Notes designer and odbc explorer.

 Dim docCase As NotesDocument
 Set docCase = s.CurrentDatabase.GetDocumentByUNID( doc.XREFID(0))
 
  Set rtitem = docCase.GetFirstItem( "SWAttachment" )

doc comes as parameter from a view which does not contain "SWAttachment"  but as far as i understand this function s.CurrentDatabase.GetDocumentByUNID( doc.XREFID(0)) should retrieve the whole document with all the fields.(it doesn't)

SWAttachment is part of a subform which is part of a  form on which  the view was created.(at least this is what i can see I could be wrong)

Sorry but I am not at all a Lotus developer I just need this task to be done. Hope is more clear now.
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 40297871
Ah, Swing... :-)

A document is always "whole", but its fields do not have to match the form used to create the document. A form only serves to show a document on the screen. Fields that are on the form but not in the document are just left empty (or initialized using the form's formulas) and fields not on the form are simply not shown.

AFAIK SwAttachment is a rich-text field, and this type of fields cannot be shown in a view. That would explain its absence from the view.

Still uncertain about what your "task" is. What do you want to do with the contents of the field SwAttachment?
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:Nordicit
ID: 40298142
Thanks for your reply.

I have to import notes documents to a different system.(I can import all the data except pdfs saved to some fields)

In this SwAttachment field is saved a pdf file. Through odbc explorer i can see the field on  the table but I can't import it(I have read on the internet that this is not possible i have to use a script to export these files.)

Then i have tried to build a script which would go through all notes documents extract this pdf and save it to a certain folder.

The only part which i am missing is how to access that field.

If i am going with debugger through items list on the note document that field is missing but i am sure that is there because i can see it through odbc and i can open it in lotus notes.
0
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 2000 total points
ID: 40298240
Migrating away eh? Bad idea... Better move to XPages and keep the Domino database.

Anyway, here's a script that will save all attachments, it might need some tinkering:
http://www-10.lotus.com/ldd/nd6forum.nsf/DateAllFlatweb/1d0e5d455302694385257133005dc93d?OpenDocument
0
 

Author Closing Comment

by:Nordicit
ID: 40299240
Finally it works.

Thanks a lot.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
Determining the an SCCM package name from the Package ID
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

873 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