Alpha Video Training
Results 1 to 4 of 4

Thread: Conditional Auto Increment

  1. #1
    Member
    Real Name
    james conrad
    Join Date
    Jul 2009
    Location
    Dayton, OH
    Posts
    176

    Default Conditional Auto Increment

    Hi all,

    My client is having me add a new table and grid to their web app for Change Management.

    Every time a change takes place (Change Type), they select a value from a static dropdown. (New Grid, New Table, HTML Maintenance, New CSS, and so on.)

    I have 3 fields in the table for version number.

    build_A
    build_B
    build_C

    build_A is setup with auto-increment "001"
    build_B is setup with auto-increment "00001"
    build_C is setup with calculated filed "alltrim(build_A)+ "-" + alltrim(build_B) "001-00001"

    what I need to do is only auto increment build_A id if the (Change Type) = "New CSS" or "New Grid"

    any other change type would NOT increment build_A field.

    I have setup a 'Conditional Default Values' for auto-increment under field rules to:

    "New Grid" = .F. .OR. "New CSS" = .F.

    but the field still auto increments. Have also changed them to .T.

    What I intend to do is set Build_C to a global variable and display it in the footer of my tabbed ui.

    Does anyone have any experience in this kind of setup?

    Thanks,
    James

  2. #2
    "Certified" Alphaholic
    Real Name
    Lee Vasic
    Join Date
    May 2010
    Location
    Salt Lake City
    Posts
    1,223

    Default Re: Conditional Auto Increment

    What is your database?

  3. #3
    Member
    Real Name
    james conrad
    Join Date
    Jul 2009
    Location
    Dayton, OH
    Posts
    176

    Default Re: Conditional Auto Increment

    sorry..... *.DBF

    It is an application for inventory management, and IT staging.
    Last edited by jacktheripper; 12-02-2010 at 04:15 PM.

  4. #4
    "Certified" Alphaholic
    Real Name
    Lee Vasic
    Join Date
    May 2010
    Location
    Salt Lake City
    Posts
    1,223

    Default Re: Conditional Auto Increment

    You'll need to have a control record and handle the update and increment via code. It's not too hard. It is the way we used to do it before the databases added the autoinc feature.

Similar Threads

  1. Conditional Auto Increment
    By Kevin Craske in forum Alpha Five Version 4
    Replies: 2
    Last Post: 08-15-2005, 04:46 PM
  2. Auto Auto-Increment Field
    By Ken McEntee in forum Alpha Five Version 5
    Replies: 8
    Last Post: 05-12-2004, 01:12 PM
  3. Conditional Auto Increment?
    By Tony Watts in forum Alpha Five Version 5
    Replies: 7
    Last Post: 06-11-2003, 10:15 AM
  4. conditional auto-increment??
    By MIKKI BREAUX in forum Alpha Five Version 1
    Replies: 1
    Last Post: 04-24-2003, 11:11 AM
  5. Conditional Auto Increment?
    By Jeff Snyder in forum Alpha Five Version 4
    Replies: 6
    Last Post: 10-17-2000, 06:29 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
  •