Results 1 to 8 of 8

Thread: How to update quantity after save

  1. #1
    Member
    Real Name
    Hsiu-Wen Wu
    Join Date
    Sep 2011
    Posts
    6

    Default How to update quantity after save

    I have a grid that has Actual_Qty, Qty_On_Hand, Qty_To_Order, Qty_To_Post.

    All the calculation working fine, now I would like to find out how to update Qty_On_Hand after saving the grid.

    Qty_To_Post = Qty_On_Hand - Actual_Qty, and then update Qty_On_Hand with the number from Qty_To_Post, is there a way to do this?

    From the attachment...use 9 to replace 24 after saving.

    1.jpg

  2. #2
    Member Larry Gordon's Avatar
    Real Name
    Larry Gordon
    Join Date
    May 2008
    Location
    Worcestershire, UK
    Posts
    240

    Default Re: How to update quantity after save

    I THINK you may have had no replies as your query is confusing - to me, certainly.

    If POST = ON HAND - ACTUAL, and you then want the POST to become the ON HAND number, it looks like a 'circular' calculation.

    Maybe you will get a better response if you explain the problem again...

  3. #3
    Member
    Real Name
    Toby Boogerd
    Join Date
    Aug 2012
    Posts
    28

    Default Re: How to update quantity after save

    I'm looking for similar functionality. I have a grid with OHQ (OnHandQuantity) and a button. When the user clicks the button I want to subtract 1 from OHQ and save/update database. If OHQ is 1 and user clicks button to subtract 1 (for a total of 0) then I want to remove the entire record from database. I don't even know where to start.?.

  4. #4
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,484

    Default Re: How to update quantity after save

    The goods supplied table should not be the same as the Inventory table where the Quantity in Hand value is held.

    Have a look at AlphaSports Invoice form and see how the field rules work there for Invoice Items. I know this is a desktop application but you need to get your heads around how the posting rule works and what your table structure should be.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  5. #5
    Member
    Real Name
    Hsiu-Wen Wu
    Join Date
    Sep 2011
    Posts
    6

    Default Re: How to update quantity after save

    What I mean was, I started this Job with 24 on hand, and used 15 of them which left me 9 on hand. So, when I create next job, I will start with 9 on hand, but I couldn't find a way to update this number.

  6. #6
    Member
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    843

    Default Re: How to update quantity after save

    I think I do something similar. Let me describe it.

    We warehouse products for several customers.
    My coworkers are responsible for adding and subtracting inventory.

    Additions get posted and are available immediately (we have them onhand in the building).
    Subtraction transactions get dumped into a transaction file for posting the next day (much like a bank does with your checking account).
    The page will show a quantity onhand (at the start of the day), and a quantity available (start of day - transactions that have not posted).

    The next day, I chose 1:03 am, I have the system post the transactions.
    One advantage of doing it this way is when a coworker says "hey, I goofed. Can you put those parts back in", I can easily void the transaction
    without having to jump through all kinds of hoops.

  7. #7
    Member
    Real Name
    Hsiu-Wen Wu
    Join Date
    Sep 2011
    Posts
    6

    Default Re: How to update quantity after save

    Gregg,

    So how do you achieve that? I just need to update the quantity on hand after subtract whatever was taken and ready to be use for next order.

  8. #8
    Member
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    843

    Default Re: How to update quantity after save

    I would actually do the post as quantity onhand - quantity-taken.

    For accountability reasons, I would keep quantity onhand and quantity-taken amounts in seperate tables.

    In my case, I use .dbf tables, and some calculated fields to provide the information.
    The code I use is below. I'm not sure how well this will work with what you have, but I think it's easy enough to follow.

    Code:
    maxtpull    = Qoh-tablesum("outboundtrans","postresult = 'needinfo'.and. uniqueid = '"+Uniqueid+"'","qtypulled")

Similar Threads

  1. Add quantity of records to be added from a dropdown selection
    By den1s in forum Application Server Version 9 - Web/Browser Applications
    Replies: 6
    Last Post: 07-20-2010, 03:50 AM
  2. Quantity in stock check
    By John Burke in forum Alpha Five Version 8
    Replies: 3
    Last Post: 01-13-2009, 10:02 AM
  3. problem updating inventory quantity
    By rhale@haleabc.com in forum Alpha Five Version 8
    Replies: 4
    Last Post: 10-10-2008, 10:25 AM
  4. Detecting insert or update on save
    By gcaplan in forum Alpha Five Version 6
    Replies: 3
    Last Post: 07-05-2005, 05:59 AM
  5. quantity printed of reports
    By Bobby Dally in forum Alpha Five Version 5
    Replies: 5
    Last Post: 10-22-2003, 11:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

The Reviews Are In...

It just is revolutionary and reminds me of VB and how it changed the world.
quote Robert Scoble, Scobleizer

...Version 10 is a turning point on how developers will be writing applications for the web
quote Alan Ashendorf, Lets Talk Computers

Alpha Five version 10... this version is really a break-through for web developers.
quote The Wall Street Journal, Digital Network

Our Professional Services Division

Training and Mentoring - Alpha Software's Professional Services division is here to help. We offer mentoring and training services, for those who need guidance or advice building their own applications.

Development Services - Need someone to build your application? We'll get the job done right. We have an in-house team of Alpha Five developers and a network of carefully selected artists, designers and IT professionals ready to handle projects of any size. Read more .

submit a project request

Alpha Five Awards & Press
awards
Products Store Support Services About Cart Site Map Resources Home
© Copyright 2000-2011 Alpha Software, Inc. 70 Blanchard Road Burlington, MA 01803 781.229.4500
more