Suneido

Integrated Application Platform

  • Home
  • Learning
    • Suneido Manual
    • Beginners
      • Inside Suneido
      • The Suneido Programming Language
      • The Suneido Database
      • Installing Suneido
      • Building Suneido
      • IDE Go To Tour
      • Upgrading To A New Release
    • Advanced
      • Canvas Control
      • DrawControl Part 1
      • DrawControl Part 2
      • DrawControl Part 3
      • SAX Like XML Processing
      • A Plug-In Architecture
      • A Simple Wizard Framework
      • An HTML Include Facility
      • An RSS 2 Feed Creator
      • MIME Generation
      • A New Add-on Facility
      • Workspace Improvement Hack
    • Mockito for Suneido
    • The Suneido Task Scheduler
    • Contributing To Suneido
    • Contributor Assignment of Copyright
    • Language Translation
    • Future Directions
    • Interview With Andrew Mckinlay
  • Forum
    • Announcements
    • Internals & Enhancements
    • Cookbook
    • General
  • FAQ
  • Screenshots
  • Downloads
  • Links

Lost trying to do an auto increment

Integrated Application Platform › Forums › General › Lost trying to do an auto increment

  • This topic has 2 replies, 2 voices, and was last updated 10 years, 3 months ago by amckinlay.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • December 11, 2012 at 4:20 pm #741
    Anonymous
    Inactive

    I want to increment the shipper # when accessed making Bills of lading in my customer DB. I cant seem to get the update function to work properly. Im sure that its something simple but I can be simple minded sometimes. Thanks in advance for your help. Below is my code:

    Controller
    {New()
    {
    .Data.Set(Record())
    }
    Controls:
    #(Record
    (Access bol
    startNew: true
    title: ‘Bill of Lading’
    nextNum: #(field: bill_num,
    table: bol_nextnum, table_field: nextnum)
    (Vert
    (Horz
    (Static, ‘Cosignee Name:’)
    #(Key “cosignee_db” field:”cosign_name” fillin:(shipper_num, cosign_name, cosign_address, cosign_city, cosign_st, cosign_zip)))
    (cosign_address)

    (Horz
    cosign_city (Skip 2) cosign_st (Skip 2) cosign_zip)

    Skip

    (Horz (Skip 400)(Static, ‘Bill of Lading Information’, font: ‘Arial’, size: 16, weight: 600))
    Skip
    Skip
    Skip
    (Horz bill_date (Skip 450) bill_num)
    cosignee_name
    (Horz (Static, ‘ ‘) export (Skip 535) ship_num)
    Skip
    (Horz carrier (Skip 343) trailer_num)
    Skip
    material
    Skip
    booking
    po
    release
    load
    vessel
    voyage
    seal
    Skip
    gross_wt
    tare_wt
    net_wt
    Skip
    Skip
    (Horz (Skip 450)
    )
    ))

    }

    function()
    {

    QueryApply1(“cosignee_db where cosign_name =” $ Display(.Cosign_name))
    { |x|
    Print(x.cosign_name)
    x.shipper_num = x.shipper_num + 1
    x.Update()
    Print(x.shipper_num)
    }
    num = .shipper_num + 1
    return num
    }

    December 11, 2012 at 9:46 pm #952
    Anonymous
    Inactive

    I solved my own problem this time. By changing the Display(.Cosign_name) to Display(.cosign_name). It seems to be working fine now. Now on to my next problem.

    Thanks
    Benny

    December 11, 2012 at 9:58 pm #953
    amckinlay
    Keymaster

    I was just writing a reply. I’m glad you figured it out.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

Search Forums

Log In
Welcome to the new Suneido Web Site and Forum.
Register
Lost Password
users of the previous PHPBB Forum should be able to log in with their previous username and password.

Recent Topics

  • Alpha copy of gSuneido to play with
  • how to start jsuneido ?
  • Problem Starting Suneido…
  • Dialog not showing buttons
  • New link for Suneidojo

Contact Us | Legal Statement | Privacy Statement | SiteMap

Copyright © 2023 Axon® Development Corporation. All Rights Reserved. - Open Source Integrated Database and Programming Language