Solved

Lotus Script question

Posted on 2001-06-12
12
240 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
  • 4
  • 3
  • 3
  • +2
12 Comments
 
LVL 4

Expert Comment

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

Author Comment

by:CT2000
Comment Utility
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
Comment Utility
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
 

Author Comment

by:CT2000
Comment Utility
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
Comment Utility
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
Comment Utility
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
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.

 

Author Comment

by:CT2000
Comment Utility
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
Comment Utility
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
Comment Utility
Sorry the Search should be..

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

Expert Comment

by:Areej
Comment Utility
Hello..?!!!
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
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
Comment Utility
Thank u.. :-)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

728 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

9 Experts available now in Live!

Get 1:1 Help Now