Solved

Lotus Script question

Posted on 2001-06-12
12
246 Views
Last Modified: 2013-12-18
Hi
  I got a problem here. I am trying to write a software management system in. I got an entry screen which will allow my user to enter the stock code follow by the quantity in the transaction. What I need to do is to deduce the quantity from the Inventory master which is in the same database, in the view called "Stock Maintenace".

   Anybody got any idea how to do this. I understand this has to be done using Lotus script.

    Please advise.
    Thanks in Advance.
    CT2000
0
Comment
Question by:CT2000
[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
  • 3
  • 3
  • +2
12 Comments
 
LVL 4

Expert Comment

by:martijnmulder
ID: 6184717
why not use a @dblookup if the value is available in another view in the database ?
0
 

Author Comment

by:CT2000
ID: 6184928
Question:
   @DBLOOKup is used for formula. I need to substract the quantity of the transaction from the Stock master file which is available in another view. Can I use Formula or I have to use Lotusscript?

   Please advise.
   Thanks in advance
   CT2000
0
 
LVL 4

Expert Comment

by:martijnmulder
ID: 6185240
I think you can use the @formula. but you have to be more specific on what information is in the view and whether you get this information form only 1 document or multiple documents etc.. to give you a better answer
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!

 

Author Comment

by:CT2000
ID: 6185284
Hi,
  What I need to do is, I will have an entry screen to allow my user to enter what are the items he will bring along for his job. i.e. in one entry screen, my user will be entering more than one items and the respective quantity. When the user click save. The script will have to deduce off the quantity from the Item master file.
   Can this be done using Formula or Lotus script?

   please advise.
   Thanks in advance.
   CT2000
0
 
LVL 13

Expert Comment

by:CRAK
ID: 6185478
Would @PickList( [Custom] : [Single] ; server : file ; view ; title ; prompt ; column ; categoryname ) be useful as an alternative for the @DbLookup?
It brings up a view in a popup. If you start typing the code and hit enter, you are at or near the code that you are looking for!
-> no extreme script programming so far...   ;-))

Or do you want it web-enabled as well?
0
 
LVL 4

Expert Comment

by:martijnmulder
ID: 6185512
oh ok, now it is clear to me. is the number of items limited to e.g. 10 or is it unlimited ?

If it is limited you could still @dblookup with @implode & @word to do every lookup separately

If not you have to use lotusscript.
something like this:


set item = doc.getfirstitem("item")
forall myItem in item.values
   set founddoc = view.getDocumentbyKey(myItem)
   if not founddoc is Nothing then
     quantity% = founddoc.quantity(0)
  end if
end forall
0
 

Author Comment

by:CT2000
ID: 6201046
Hi,
   I got a view called "Stock Maintenance", which the first field is "item_code" and second field is "quantity". How should.

   On my user entry screen. I have four Item codes: item_code1, item_code2, item_code3, item_code4 and for my quantity,  I have quantity1, quantity2, quantity3, quantity4.
   How should I code it in my Lotus script.

   Please advise.
   Thanks in advance
   CT2000
0
 

Accepted Solution

by:
Areej earned 15 total points
ID: 6207842
What about this...

for i=1 to 4
     Set Collection = db.Search("item_code=""" & item & cstr(i) & """", nothing, 0)
     if not collection.count = 0 then
           set doc=collection.GetFirstDocument
           doc.quantity = doc.quantity - cint(uidoc.FieldGetText("Quantity" & i))
           doc.save True, True
      End if
Next i


Hope this help ;-)
Areej
0
 

Expert Comment

by:Areej
ID: 6207847
Sorry the Search should be..

   Set Collection = db.Search("item_code=""" & item_code & cstr(i) & """", nothing, 0)
0
 

Expert Comment

by:Areej
ID: 6260783
Hello..?!!!
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6404094
It's time to clean up this topic area and that means taking care of this question. Your options at this point are:

1. Award points to the Expert who provided an answer, or who helped you most. Do this by clicking on the "Accept Comment as Answer" button that lies above and to the right of the appropriate expert's name.

2. PAQ the question because the information might be useful to others, but was not useful to you. To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.

3.  Ask Community Support to help split points between participating experts.  Just comment here with details.

4.  Delete the question because it is of no value to you or to anyone else.  To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.

If you elect for option 2, 3 or 4, just post comment with details here and I'll take it from there.  We also request that you review any other open questions you might have and update/close them.  Display all your question history from your Member Profile to view details.

PLEASE DO NOT AWARD THE POINTS TO ME.

____________________________________________



Hi Experts:

In the event that the Asker does not respond, I would very much appreciate your opinions as to which Expert ought to receive points (if any) as a result of this question.  Likewise, you can also suggest that I PAQ or delete the question.

Experts, please do not add further "answer" information to this question.  I will be back in about one week to finalize this question.

Thank you everyone.

Moondancer :)
Community Support Moderator @ Experts Exchange

P.S.  REGARDING POINTS, Guidelines and more:  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp  
0
 

Expert Comment

by:Areej
ID: 6407382
Thank u.. :-)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Question has a verified solution.

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

Suggested Solutions

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 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