?
Solved

Multiple line items in lotus form 8.5 in web application

Posted on 2010-11-16
10
Medium Priority
?
511 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +1
10 Comments
 
LVL 22

Expert Comment

by:mbonaci
ID: 34153089
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
ID: 34153190
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
ID: 34153955
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 34154020
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
 
LVL 3

Expert Comment

by:ironclads
ID: 34159174
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
ID: 34210625
ironclads:

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

Expert Comment

by:Sjef Bosman
ID: 34470902
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 2000 total points
ID: 34473635
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
ID: 34474060
"C'est le ton qui fait la musique" , but maybe I didn't listen right...

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

Featured Post

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
Suggested Courses

762 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