Field convert for server document link

What is the best way to take the value from a form field and convert it, behind the scenes, to a specific xref value in order to access a document on the server with that xref value.  Ex:  process B-P-030 entered has a xref of 79, the document name on the server is 79.doc.
Thank You !
LVL 4
pratiganAsked:
Who is Participating?
 
zvonkoConnect With a Mentor Commented:
let us say: fifty :-)

This is usual for easy questions, but you can let it as is if this question is completed for you.

Cheers,
zvonko
0
 
zvonkoCommented:
It depends :-)

It depends on two things: how many rows and how offten are this rows changed.

If less then 100 rows and seldom changed, then it is bad habit (but good working :-) to put the list complet into DialogList design.
Do it like this:
Create a new field, type: DialogList
In second tab of field property box enter for choices this lines:
B-P-030 | 79.doc
B-P-031 | 80.doc
B-P-032 | 81.doc
B-P-033 | 82.doc

That mean: user does see field Text "B-P-032" and in the document item value is stored: "81.doc"

In web both values are accessible by JavaScript, in LotusScript only the stored value "81.doc"

The correct design, on other hand, would be to make a view for this choices. Than you can enter for this field choices not the values line by line, but a single @DbLookup formula. This can be done in several ways, so please state first wath your aproach will be: hardcoded in desing or with @DbLookup

And please increase the points a bit if you have more questions about this. One hundred would be enough for this sort of questions.


So long,
zvonko

0
 
pratiganAuthor Commented:
Fastst and easiest approach.  The conversion values will never or very rarly change.  There are a little over 330 row.  I was thinking of accessing a list ?!?!?!
I will increase the points if the approach is harder than I thought.
Thank You !
Paul
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
zvonkoCommented:
Uuuups, 330 are managable to be placed directly into design, but not realy a good idea.

So if you say they are hardly change, then do it like this:
1.) Create a form, name: ConfigDoc
2.) Give this form two fields: ConfigKey and ConfigValue
3.) ConfigKey is simple Text, ConfigValue also Text but with option: AllowMultipleValues
4.) Create a document with this form. Enter this field values:
ConfogKey: xref
ConfigValue: B-P-030 | 79.doc; B-P-031 | 80.doc; B-P-032 | 81.doc; B-P-033 | 82.doc
5.) Create a view, name: ConfigDocs
6.) ViewSelectionFormula is: SELECT ((Form = "ConfigDoc"))
7.) First and only colum of this view is SORTED and use the field: ConfigKey
8.) On your form create a field of type DialogList
9.) For the choices in second property tab enter this formula:
@DbLookup("";@DbName;"ConfigDocs";"xref";"ConfigValue")

Next time when you create a document with your form containing this DialogList field, and you click on EntryHelper twistie, then you get a list of LeftPart values, like:
B-P-030
B-P-031
B-P-032
B-P-033

But when you store this document then you will see the  coresponding value stored into your document (79.doc...)

My upper statement with accessing leftpart text is not absolutely true. As long as you are in the form on Notes client you can access this field text by the NotesUIDocument function uidoc.FieldGetText
In stored document or in client backend document you get only the right part value ( 79.doc ... )

Is this something you can use?


0
 
pratiganAuthor Commented:
HEllo Zvonko,
This is exactly what I can use.  I was in the process of creating a form as I received your reply.  I was going to create a form with 2 fields and then hide the form, then create a single view to extract the specific value xref from depending upon the value I enter in the processid field.  Whihc is what you have indicated. However, I was not thinking of the dialog drop down formula, thats a great added feature to this process.  Thank You !!
How many points do you feel worthy of.
Thanks !
Paul
0
 
pratiganAuthor Commented:
Thank You Zvonko... I have updated the points to 50.
Thanks Again for all your Help !!
Paul
0
 
pratiganAuthor Commented:
Thank You !!
0
 
zvonkoCommented:
you are welcome :-)

hope next time to be also of help to you.

So long,
zvonko


0
 
pratiganAuthor Commented:
Hello Zvonko,
I'm getting a message when I create a doc with that dialoglist field, entry not found in index or index not built.... Any ideas ?!?!?!
Thanks !!
0
 
zvonkoCommented:
I got a mess with all the mails :-)

have we settled all now?

0
 
pratiganAuthor Commented:
Yes.. I have resolved the index problem.  
Thank You much !!!
Paul
0
 
pratiganAuthor Commented:
FYI.. Zvonko,
The hidden document with xref andthe convert values is appearing within my list of views, but no data fields are showing, but the document created to perform the conversion is creating a place holder in the views.  Is ther a way to prevent this placeholder and have the conversion document just exist in the background.  The views do not contain any of the fields from the conversion document.????
0
 
pratiganAuthor Commented:
Hello Zvonko,
Please disregard previous note... it came to me after I sent it.
Thanks !
Paul
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.