Alpha Video Training
Results 1 to 5 of 5

Thread: Post Data Rule - limitations

  1. #1
    Ian Stewart
    Guest

    Default Post Data Rule - limitations

    I have two databases currently not linked (but they could be linked in a set).
    The first database (orders)has "itemcode" and "quantity". "quantity is not user entered but the summary result of a third database.
    The second database (inventory) has "itemcode", "partno", "stock" and "minimum level". There can be more than one record with the same "itemcode" but with different "partno".

    PROBLEM: Where each of the "itemcode" in the second database matches the "itemcode" in the first, I need to reduce the "stock" data by the "quantity" data from the first database.

    ALPHA 4 MANUAL Notes: tell me
    1) You cannot post to a child database linked through a one-to-many link, and,
    2) When posting to an external database only the first matching record is updated.

    ANY HELPFUL SUGGESTIONS WOULD BE APPRECIATED - I.S.

  2. #2
    Member
    Real Name
    Duncan Greenshields
    Join Date
    May 2000
    Location
    Toronto, ON
    Posts
    216

    Default RE: Post Data Rule - limitations

    Ian;
    If the Inventory db has several records with the same itemcode, is "Stock" to be reduced by the same "Quantity" in each and all of the records, or is the "Quantity" reduction to be divided up among the multi records?

    Duncan

  3. #3
    Ian Stewart
    Guest

    Default RE: Post Data Rule - limitations

    Duncan,
    Each record that matches "itemcode" is to be reduced by "quantity" from the first database.
    Basically we produce an item "itemcode" which is made up of quantity one of several parts "partno".
    I didn't mention it earlier not wanting to confuse the situation, but one of the parts "partno" is duplicated in a number of the items "itemcode".

    Thanks for your help and interest.
    Regards Ian

  4. #4
    Member
    Real Name
    Duncan Greenshields
    Join Date
    May 2000
    Location
    Toronto, ON
    Posts
    216

    Default RE: Post Data Rule - limitations

    Ian;
    I believe your problem would be solved by creating a set using an index based upon your item code. However, your second database (Inventory) would be the primary database, and Orders would be linked to it (a "many to one" set) via an ITEMCODE index.

    You could then set up a global update to subtract the value of "Quantity" in the ORDERS db from "Stock" in the primary database. Every matching "itemcode" record would have the quantity amount subtracted.

    I have created a sample set to illustrate how it would work ... however, to illustrate it I added a field in the Inventry db called "result" to show you that it works. I hope I can get the backedup set to attach to this reply.

    Duncan

  5. #5
    Ian Stewart
    Guest

    Default RE: Post Data Rule - limitations

    Duncan,
    Many thanks, you have solved my problem. I had previously tried a set but used the wrong primary database. Appreciate your efforts in getting this resolved.
    Ian Stewart

Similar Threads

  1. Field rule limitations
    By Chris Zito in forum Alpha Five Version 5
    Replies: 8
    Last Post: 02-03-2004, 06:19 AM
  2. Sets - field rule - calculated data entry
    By Ales SKlepic in forum Alpha Five Version 5
    Replies: 4
    Last Post: 12-28-2003, 08:39 AM
  3. field rule post vs. <tbl>.post()
    By tcampb in forum Alpha Five Version 4
    Replies: 8
    Last Post: 10-22-2003, 11:17 PM
  4. HELP - Cannot build/open post index rule
    By TerriH in forum Alpha Five Version 4
    Replies: 3
    Last Post: 04-14-2003, 06:03 AM
  5. Post Rule
    By Bryan Hoey in forum Alpha Five Version 5
    Replies: 2
    Last Post: 01-31-2003, 11:44 AM

Bookmarks

Posting Permissions

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