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

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.
NordicitAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sjef BosmanGroupware ConsultantCommented:
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
NordicitAuthor Commented:
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
Sjef BosmanGroupware ConsultantCommented:
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
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

NordicitAuthor Commented:
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
Sjef BosmanGroupware ConsultantCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
NordicitAuthor Commented:
Finally it works.

Thanks a lot.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Server Software

From novice to tech pro — start learning today.