Solved

Multiple line items in lotus form 8.5 in web application

Posted on 2010-11-16
10
504 Views
Last Modified: 2013-12-18
How can I develop a form using lotus notes to input master details for my purchase request application. The user has to input multiple line items for each purchase request.
0
Comment
Question by:jobby1
  • 4
  • 2
  • 2
  • +1
10 Comments
 
LVL 22

Expert Comment

by:mbonaci
Comment Utility
Two possible solutions:
1. use embedded view on your form and create a document for each detail record
2. use multivalue fields

I always suggest first, cuz it's cleaner and easier to develop and maintain.
0
 
LVL 46

Expert Comment

by:Sjef Bosman
Comment Utility
Web application eh? It should be relatively easy in XPages. Lacking that possibility, you'd have to develop quite some JavaScript to do it all client-side, whether you use AJAX or not.

As for multiple documents or multi-value fields: I tend to see a purchase request as one single document, and the mere thought of having request lines in separate documents makes me shiver. I therefore always suggest multi-value fields...
0
 

Author Comment

by:jobby1
Comment Utility
sjef_bosman: i argee to your point. To mak it multiple field not possible since I dont know hw many line items in a request. It can be x number of items in a request. Any xpage samples avaialble.
0
 
LVL 46

Expert Comment

by:Sjef Bosman
Comment Utility
Nothing available right now, sorry. Multiple field is definitely possible, I'll explain. If you have 4 purchase order lines, with for each POL the elements Number, Product and Price, you create 3 fields Number, Product and Price, and each field will have 4 values. So Number[1], Product[1] and Price[1] form one "record".

I suppose you can handle it using a data table control and a repeat control, but I never tried myself (yet).
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 3

Expert Comment

by:ironclads
Comment Utility
jobby1, you can do what you'd like with a form when using the web.  Its pretty flexible.  If I understand your request correctly, you are looking at creating a document that has mulitple "line items", but not neccessarily have a field for each value, correct?  Of course, everything needs something mapped to something else, so you don't want values generated that are worthless to you, but you can create fields on the fly in html or just html.  When those values are populated, you can then have a single or several fields gather the values from those html fields when saving the document.  From there you can parse up the values in the stored field.  This is one way.

Another way I've used and to story line an example:  If you want to have users given a list of values to choose from that are pulled from a view.  You'd put a RichText field on the form that is set to computed, with itself as the value and display as HTML set.  From there set a "WebQueryOpen" agent on the form.  Have the Lousscript agent look up the view and for each value, compose a html span.  Inside each span put your values/tables/etc.  Populate the RichText field with the composed html.  In the JS Header of the form, when a span is clicked, populate a field with the key or value of the item clicked.  Then when they save the form, clear the rich text field so no html is saved, but the key values are saved.  I can give you some starter code if you are interested in this scenario.  With some work, you can make it do exactly what you want.

Let me know.

-TIM

If this is not what you are looking for, please clarify what exactly you are trying to  accomplish and I'm sure I can help.
0
 

Author Comment

by:jobby1
Comment Utility
ironclads:

Please give me the starter code you have mentioned.
0
 
LVL 46

Expert Comment

by:Sjef Bosman
Comment Utility
I get the idea there is a misunderstanding here somewhere. A sentence like "give me the starter code" usually isn't appreciated by the Experts, in any case not by me, because it seems to indicate that you don't intend to develop the solution yourself, but you try to take advantage of someone else's work. We (in this Zone) help the developer, we don't actually develop, and when code is shared it's usually the result of shared interests or after an in-depth discussion of the problem.

As far as I can see, you never reacted on my last suggestion, which makes me assume that you don't understand the concept of putting x values in one multi-value field, where the number of elements in that field corresponds with the number of invoice lines (for instance). Don't blame us when we don't respond to your questions. It's your job to interact with us, to ask the right question and to ask questions the right way.

By the way, we Experts are volunteers, we don't get paid for answering questions at all. We just like to help people in solving their problems.

So, in response to your statement "No proper answer", I'd like to say "No proper question".

If the problem is still there, we could go on of course, if you tell us what you already tried (and more).
If you solved the problem, I'd like to know how.
0
 
LVL 3

Accepted Solution

by:
ironclads earned 500 total points
Comment Utility
Sorry for the delay.  I was really busy the past couple of months.  Here's some code taken from what I have.  Start off with the WebQueryOpen agent.  It creates HTML fields on the form.  When you click the OK button on the form, you'll then need to either copy the selected values over to an actual field on the form or, as I do it, populate a field from the parent window.  Please let me know if you have further questions and, please, don't let others make you feel back for asking for code.  As my old saying goes, "Nothing is obvious to the uninformed."  I ask for code all the time.  How else can you learn without reinventing the wheel, no?

Oh, the file is an nsf, but it has been changed to .txt.  Unzip the .txt file and change it back to .nsf.

Enjoy!

-TIM
Transport2.zip
0
 
LVL 46

Expert Comment

by:Sjef Bosman
Comment Utility
"C'est le ton qui fait la musique" , but maybe I didn't listen right...

@Tim: you're too good :-)
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

744 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

17 Experts available now in Live!

Get 1:1 Help Now