Solved

Lookup rich text fields in any database

Posted on 2004-08-13
10
425 Views
Last Modified: 2013-12-18
For reporting reasons I need to have an agent that scanns all databases on a server and reports in which databases a rich text field is used.

I've got the code to scan the databases and walk through all forms in a database, but I can't seem to extract the rich text fields from the form note.

Using the API function NSFNoteInfo for a rich text field the data type is always returned as TYPE_INVALID_OR_UNKOWN (=0), where it should be TYPE_COMPOSITE.

Does anybody know of a way how I can walk through all forms in a database and check if there is a rich text field on it? Using LotusScript or C API or any other method?
0
Comment
Question by:Jean Marie Geeraerts
10 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 11792677
API functions are sensitive on data type that you pass.. for instance check this one..

http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/5de580478807fc0f85256ea200356faa?OpenDocument

Also make sure the length of the item is correct.

~Hemanth
0
 
LVL 8

Author Comment

by:Jean Marie Geeraerts
ID: 11792759
Yes, I know. Wrong declaration and you could get a "red box of death" :-)
Will look into it and keep you posted.
0
 
LVL 8

Author Comment

by:Jean Marie Geeraerts
ID: 11792870
Apparently this bit of info doesn't get us any further.
The problem is we have a reference to the form design element and when we use above function to retrieve info from an item, we don't get the correct value for the item type from the API function.

Do you have any idea as to why this wouldn't be working as it should?
On a regular data document, when you get the properties this way it returns the correct type.
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 31

Expert Comment

by:qwaletee
ID: 11793036
Thing is, since a form's definition can change without changing the underlying data (documents already created with the form), you are goingto have to be careful with scope: do you want to check for current design using RTF, or for current data, or both.

To check for current data, you would haveto scan every doc in the database.  Checking forms is trickier, as you found, for a very simple reason: the way Notes stores a form's design.  A form is itself a note (document).  It has the following fields:

1) $Body - a rich text field that contains the form's content, including text, style, hootspots, images, etc. -- and a PLACEHOLDER for each field without any defintion for that field

2) $* -- a bunch of other fields whose names start with $ that control how the form is used (e.g., flag for store form in document), along with a few others (e.g., $UpdatedBy, which has no real function except to record the last person to edit the form)

3) A field for every field definition on the form.  These fields have the same name as the form's fields, contain the description of the fields (data type, formula, etc.), and have a special flag PLACEHOLDER.  The data type for these fields is not really relevant -- I think numbers and dates placeholders are actually stored as numbers and dates, everything else is a special type (though it should not be unknown... see what actual numeric value is returned, and match that against teh constants.  I don't think it matches teh standard unknown, though the specific number may not be defined)

----

A better way to do this might be to use the R6 client, with DXL, to get the form defintion, use teh DXL transform interpreters to go down to just teh field defintion level, and pull the data type flags.
0
 
LVL 8

Author Comment

by:Jean Marie Geeraerts
ID: 11793225
Well, we don't have R6 available yet, so we'll have to do with R5 for the time being.

We did get as far as to the design note of the form and found the fields describing the fields on the note, but now want to read from these fields or in another way if any rich text fields are specified in the current design. (in current data is not important for our report)
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 11793375
Why don't you use a view (described in previous question using $FormulaClass) to list all the design elements.. And treat them as document and read it !
0
 
LVL 8

Author Comment

by:Jean Marie Geeraerts
ID: 11793477
I don't expect it to make a difference, since we now open the document by it's unid through api call NSFNoteOpen and then get the item info through NSFItemInfo.
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 13004241
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
    PAQ with points refunded

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

Zvonko
EE Cleanup Volunteer
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 13042855
PAQed with points refunded (500)

modulo
Community Support Moderator
0
 
LVL 8

Author Comment

by:Jean Marie Geeraerts
ID: 13061488
Hm, didn't get a chance to react, because I was at home sick all week, but don't mind the question being closed since we are no longer looking into it anyway.
Would have been nice to have had an answer, though :(
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Word Pro Conversion utility 13 34
Lotus notes send email with attachments 8 166
Combine textlist text elements in Lotus Notes ReadViewEntries 3 122
@Mailsend 3 57
  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…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

786 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