Alpha Video Training
Results 1 to 6 of 6

Thread: Auto Increment filed rule in set

  1. #1
    Member
    Real Name
    shakapdeen
    Join Date
    Feb 2012
    Posts
    8

    Default Auto Increment filed rule in set

    I am having two tables say example Po Main [ ponumber,vendor, date....] , po details [ ponumber , srno, item1,....]

    I have created set called po set.

    I have link both the tables via ponumber [ auto increment ]

    I have another field srno [ auto increment]

    every thing is working , the think is that
    in ponumber a001 i have five serial number 1,2,3,4,5

    I am going to add new ponumber a002 i want the srno as same 1,2,3,4,5

    But In alpha srno is coming as 6,7,8,9,10

    How can design to bring the srno as 1,2,3,4,5

    can any one help me

    Thanks

    saha

  2. #2
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,403

    Default Re: Auto Increment filed rule in set

    I don't think you need the second Auto Increment - you are effectively creating two different ones.
    There are a number of ways to do this, so best thing would be to post a copy of the database here so we will be aware of the design and can offer a solution.
    Ted Giles
    Example Consulting - UK
    .

    http://ec12.example-software.com//
    See our site for Alpha Support, Conversion and Upgrade.

  3. #3
    Member
    Real Name
    shakapdeen
    Join Date
    Feb 2012
    Posts
    8

    Default Re: Auto Increment filed rule in set

    Dear Ted Giles,

    I have attached the zip file of sample dbf. Kindly check it and give me solution

    Awaiting for your kind reply

    thanks

    saha
    Attached Files Attached Files

  4. #4
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,403

    Default Re: Auto Increment filed rule in set

    It will be later today now Saha.
    Ted Giles
    Example Consulting - UK
    .

    http://ec12.example-software.com//
    See our site for Alpha Support, Conversion and Upgrade.

  5. #5
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default Re: Auto Increment filed rule in set

    Saha, Ted, is right. The autoinc field rule in the po details table will not "re-start" on each new po. That rule is designed to supply unique numbers for all records in the table. Your goal is to find a way to create a "running count" of items in each PO. Suggest you search the message board for threads discussing

    running count
    numbering rows in browse
    or similar terms

    perhaps you'll find an example that you can adapt to your situation.

    Incidentally, you may find that you don't need to store the "row number" in each detail record. This can be computed for you in your reports using the run_count() function. So, if your goal is to show numbered rows in your PO report, you may be able to achieve this at report time, instead of at data entry time, if you see what I mean. Personally I prefer to do this at report time. Imagine the difficulty you will have if you store a "row number" in each detail record and then your user decides to delete a row from the middle of the order. Re-numbering would be required, right? Gets messy in a hurry.

    -- tom

  6. #6
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,403

    Default Re: Auto Increment filed rule in set

    Ted Giles
    Example Consulting - UK
    .

    http://ec12.example-software.com//
    See our site for Alpha Support, Conversion and Upgrade.

Similar Threads

  1. Auto increment file type rule disable in an Active Link table
    By chematercero in forum Alpha Five Version 9 - Desktop Applications
    Replies: 0
    Last Post: 01-06-2010, 01:05 PM
  2. Auto-increment field rule fails when writing to a table in code
    By alexmuir in forum Alpha Five Version 9 - Desktop Applications
    Replies: 24
    Last Post: 03-04-2009, 11:35 AM
  3. skip field rule after auto increment
    By rwaldsmith in forum Alpha Five Version 8
    Replies: 2
    Last Post: 12-21-2007, 06:19 PM
  4. Auto increment field rule
    By kasiawatson in forum Alpha Five Version 8
    Replies: 16
    Last Post: 07-09-2007, 02:53 AM
  5. Auto Increment Field Rule
    By Sigrist in forum Alpha Five Version 6
    Replies: 9
    Last Post: 09-17-2004, 09:04 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
  •