Link to home
Start Free TrialLog in
Avatar of jobby1
jobby1

asked on

Multiple line items in lotus form 8.5 in web application

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.
Avatar of mbonaci
mbonaci
Flag of Croatia image

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.
Avatar of Sjef Bosman
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...
Avatar of jobby1
jobby1

ASKER

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.
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).
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.
Avatar of jobby1

ASKER

ironclads:

Please give me the starter code you have mentioned.
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.
ASKER CERTIFIED SOLUTION
Avatar of Tim Williams
Tim Williams
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
"C'est le ton qui fait la musique" , but maybe I didn't listen right...

@Tim: you're too good :-)